Mercurial > dropbear
comparison libtomcrypt/coverage.sh @ 1471:6dba84798cd5
Update to libtomcrypt 1.18.1, merged with Dropbear changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 09 Feb 2018 21:44:05 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1470:8bba51a55704 | 1471:6dba84798cd5 |
---|---|
1 #!/bin/bash | |
2 | |
3 set -e | |
4 | |
5 if [ "$TRAVIS_CI" == "private" ]; then | |
6 exit 0 | |
7 fi | |
8 | |
9 if [ "$#" != "5" ]; then | |
10 echo "Usage is: ${0} \"coverage\" \"<prepend CFLAGS>\" \"<makefile>\" \"<append CFLAGS>\" <math library to link to>" | |
11 echo "CC=gcc ${0} \"coverage\" \" \" \"makefile\" \"-DUSE_LTM -DLTM_DESC -I../libtommath\" ../libtommath/libtommath.a" | |
12 exit -1 | |
13 fi | |
14 | |
15 if [ -z "$(echo $CC | grep "gcc")" ]; then | |
16 echo "no gcc detected, early exit success" | |
17 exit 0 | |
18 fi | |
19 | |
20 if [ "$(echo $3 | grep -v 'makefile[.]')" == "" ]; then | |
21 echo "only run $0 for the regular makefile, early exit success" | |
22 exit 0 | |
23 fi | |
24 | |
25 # output version | |
26 bash printinfo.sh | |
27 | |
28 bash build.sh " $1" " $2" " $3 COVERAGE=1" "$4" "$5" | |
29 if [ -a testok.txt ] && [ -f testok.txt ]; then | |
30 echo | |
31 else | |
32 echo | |
33 echo "Test failed" | |
34 exit 1 | |
35 fi | |
36 | |
37 ./coverage_more.sh > test_coverage_more.txt || { rm -f testok.txt && exit 1 ; } | |
38 | |
39 make lcov-single | |
40 # if this was executed as './coverage.sh ...' create coverage locally | |
41 if [[ "${0%% *}" == "./${0##*/}" ]]; then | |
42 make lcov-html | |
43 else | |
44 coveralls-lcov coverage.info | |
45 fi | |
46 | |
47 exit 0 | |
48 | |
49 # ref: $Format:%D$ | |
50 # git commit: $Format:%H$ | |
51 # commit time: $Format:%ai$ |