Mercurial > dropbear
comparison libtomcrypt/testme.sh @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 6dba84798cd5 |
children |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | |
3 if [ $# -lt 3 ] | |
4 then | |
5 echo "usage is: ${0##*/} <which makefile and other make options> <additional defines> <path to math provider>" | |
6 echo "e.g. \"${0##*/} \"makefile -j9\" \"-DUSE_LTM -DLTM_DESC -I../libtommath\" ../libtommath/libtommath.a\"" | |
7 echo "to create aggregate coverage: pre-pend with LTC_COVERAGE=1" | |
8 exit -1 | |
9 fi | |
2 | 10 |
3 # date | 11 # date |
4 echo "date="`date` | 12 echo "date="`date` |
5 | 13 |
6 # output version | 14 # check sources |
7 echo "Testing verion" `grep "^VERSION=" makefile | sed "s/.*=//"` | 15 bash check_source.sh "CHECK_SOURCES" " " "$1" "$2" "$3" || exit 1 |
8 #grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"` | |
9 | 16 |
10 # get uname | 17 mk="$1" |
11 echo "uname="`uname -a` | |
12 | 18 |
13 # get gcc name | 19 [ "$LTC_COVERAGE" != "" ] && mk="$mk COVERAGE=1" |
14 echo "gcc="`gcc -dumpversion` | |
15 echo | |
16 | 20 |
17 # stock build | 21 # stock build |
18 bash run.sh "STOCK" " " "$1" "$2" "$3" || exit 1 | 22 bash run.sh "STOCK" " " "$mk" "$2" "$3" || exit 1 |
23 | |
24 # EASY build | |
25 bash run.sh "EASY" "-DLTC_EASY" "$mk" "$2" "$3" || exit 1 | |
19 | 26 |
20 # SMALL code | 27 # SMALL code |
21 bash run.sh "SMALL" "-DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1 | 28 bash run.sh "SMALL" "-DLTC_SMALL_CODE" "$mk" "$2" "$3" || exit 1 |
22 | 29 |
23 # NOTABLES | 30 # NOTABLES |
24 bash run.sh "NOTABLES" "-DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 | 31 bash run.sh "NOTABLES" "-DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 |
25 | 32 |
26 # SMALL+NOTABLES | 33 # SMALL+NOTABLES |
27 bash run.sh "SMALL+NOTABLES" "-DLTC_SMALL_CODE -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 | 34 bash run.sh "SMALL+NOTABLES" "-DLTC_SMALL_CODE -DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 |
28 | 35 |
29 # CLEANSTACK | 36 # CLEANSTACK |
30 bash run.sh "CLEANSTACK" "-DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 | 37 bash run.sh "CLEANSTACK" "-DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 |
31 | 38 |
32 # CLEANSTACK + SMALL | 39 # CLEANSTACK + SMALL |
33 bash run.sh "CLEANSTACK+SMALL" "-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 | 40 bash run.sh "CLEANSTACK+SMALL" "-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 |
34 | 41 |
35 # CLEANSTACK + NOTABLES | 42 # CLEANSTACK + NOTABLES |
36 bash run.sh "CLEANSTACK+NOTABLES" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1 | 43 bash run.sh "CLEANSTACK+NOTABLES" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK" "$mk" "$2" "$3" || exit 1 |
37 | 44 |
38 # CLEANSTACK + NOTABLES + SMALL | 45 # CLEANSTACK + NOTABLES + SMALL |
39 bash run.sh "CLEANSTACK+NOTABLES+SMALL" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1 | 46 bash run.sh "CLEANSTACK+NOTABLES+SMALL" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" "$mk" "$2" "$3" || exit 1 |
40 | 47 |
41 # NO_FAST | 48 # NO_FAST |
42 bash run.sh "NO_FAST" "-DLTC_NO_FAST" "$1" "$2" "$3" || exit 1 | 49 bash run.sh "NO_FAST" "-DLTC_NO_FAST" "$mk" "$2" "$3" || exit 1 |
43 | 50 |
44 # NO_FAST + NOTABLES | 51 # NO_FAST + NOTABLES |
45 bash run.sh "NO_FAST+NOTABLES" "-DLTC_NO_FAST -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1 | 52 bash run.sh "NO_FAST+NOTABLES" "-DLTC_NO_FAST -DLTC_NO_TABLES" "$mk" "$2" "$3" || exit 1 |
46 | 53 |
47 # NO_ASM | 54 # NO_ASM |
48 bash run.sh "NO_ASM" "-DLTC_NO_ASM" "$1" "$2" "$3" || exit 1 | 55 bash run.sh "NO_ASM" "-DLTC_NO_ASM" "$mk" "$2" "$3" || exit 1 |
56 | |
57 # NO_TIMING_RESISTANCE | |
58 bash run.sh "NO_TIMING_RESISTANCE" "-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" "$mk" "$2" "$3" || exit 1 | |
59 | |
60 # CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE | |
61 bash run.sh "CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE" "-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING" "$mk" "$2" "$3" || exit 1 | |
49 | 62 |
50 # test build with no testing | 63 # test build with no testing |
51 bash testbuild.sh "NOTEST" "-DLTC_NO_TEST" "$1" "$2" "$3" || exit 1 | 64 bash testbuild.sh "NOTEST" "-DLTC_NO_TEST" "$mk" "$2" "$3" || exit 1 |
52 | 65 |
53 # test build with no file routines | 66 # test build with no file routines |
54 bash testbuild.sh "NOFILE" "-DLTC_NO_FILE" "$1" "$2" "$3" || exit 1 | 67 bash testbuild.sh "NOFILE" "-DLTC_NO_FILE" "$mk" "$2" "$3" || exit 1 |
55 | 68 |
56 # $Source: /cvs/libtom/libtomcrypt/testme.sh,v $ | 69 # ref: $Format:%D$ |
57 # $Revision: 1.20 $ | 70 # git commit: $Format:%H$ |
58 # $Date: 2006/01/26 14:49:43 $ | 71 # commit time: $Format:%ai$ |