forked from open-quantum-safe/liboqs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-tests.sh
executable file
·79 lines (64 loc) · 1.74 KB
/
.travis-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
set -e
export CC=$CC_OQS
autoreconf -i
enable_disable_str=
if [[ ${USE_OPENSSL} == 1 ]];then
enable_disable_str=" --enable-openssl"
if [[ ! -z "${OPENSSL_DIR// }" ]];then
enable_disable_str+=" --with-openssl-dir=${OPENSSL_DIR}"
fi
fi
if [[ ${AES_NI} == 0 ]];then
enable_disable_str+=" --disable-aes-ni"
fi
if [[ ${ENABLE_CODE_MCBITS} == 1 ]];then
enable_disable_str+=" --enable-kex-code-mcbits"
if [[ ! -z "${SODIUM_DIR// }" ]];then
enable_disable_str+=" --with-sodium-dir=${SODIUM_DIR}"
fi
fi
if [[ ${ENABLE_SIDH_IQC_REF} == 1 ]];then
enable_disable_str+=" --enable-kex-sidh-iqc-ref"
if [[ ! -z "${GMP_DIR// }" ]];then
enable_disable_str+=" --with-gmp-dir=${GMP_DIR}"
fi
fi
if [[ ${ENABLE_KEX_LWE_FRODO} == 0 ]];then
enable_disable_str+=" --disable-kex-lwe-frodo"
fi
if [[ ${ENABLE_KEX_MLWE_KYBER} == 0 ]];then
enable_disable_str+=" --disable-kex-mlwe-kyber"
fi
if [[ ${ENABLE_KEX_NTRU} == 0 ]];then
enable_disable_str+=" --disable-kex-ntru"
fi
if [[ ${ENABLE_KEX_RLWE_MSRLN16} == 0 ]];then
enable_disable_str+=" --disable-kex-rlwe-msrln16"
fi
if [[ ${ENABLE_KEX_RLWE_NEWHOPE} == 0 ]];then
enable_disable_str+=" --disable-kex-rlwe-newhope"
fi
if [[ ${ENABLE_KEX_SIDH_CLN16} == 0 ]];then
enable_disable_str+=" --disable-kex-sidh-cln16"
fi
if [[ ${USE_PICNIC} == 1 ]];then
enable_disable_str+=" --enable-picnic"
./download-and-setup-picnic.sh
if [[ ! -z "${M4RI_DIR// }" ]];then
enable_disable_str+=" --with-m4ri-dir=${M4RI_DIR}"
fi
fi
./configure --enable-silent-rules ${enable_disable_str}
make clean
make
make test
for f in $(ls .travis/*-check.sh); do
if [[ ${USE_PICNIC} == 1 ]];then
if [[ ! "$f" == ".travis/global-namespace-check.sh" ]];then
bash $f;
fi
else
bash $f;
fi
done