comparison libtomcrypt/coverity.sh @ 1478:3a933956437e coverity

update coverity
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 23:49:22 +0800
parents 6dba84798cd5
children
comparison
equal deleted inserted replaced
1439:8d24733026c5 1478:3a933956437e
1 #!/bin/bash
2
3 if [ $# -lt 2 ]
4 then
5 echo "usage is: ${0##*/} <path to coverity scan> <extra compiler options>"
6 echo "e.g. \"${0##*/} \"/usr/local/bin/coverity\" \"-DLTM_DESC -I/path/to/libtommath/\"\""
7 exit -1
8 fi
9
10 PATH=$PATH:$1/bin
11
12 make clean
13 rm -r cov-int/
14
15 myCflags=""
16 myCflags="$myCflags -O2 ${2}"
17 myCflags="$myCflags -pipe -Werror -Wpointer-arith -Winit-self -Wextra -Wall -Wformat -Wformat-security"
18
19 CFLAGS="$myCflags" cov-build --dir cov-int make -f makefile.unix $MAKE_OPTS IGNORE_SPEED=1 1>gcc_1.txt
20
21 if [ $? -ne 0 ]
22 then
23 echo "make failed"
24 exit -1
25 fi
26
27 # zipup everything
28 tar caf libtomcrypt.lzma cov-int
29
30 mytoken=$(cat .coverity_token)
31 mymail=$(cat .coverity_mail)
32 myversion=$(git describe --dirty)
33
34 curl -k --form project=libtomcrypt \
35 --form token=${mytoken} \
36 --form email=${mymail} \
37 --form [email protected] \
38 --form version=\"${myversion}\" \
39 --form description="\"libtomcrypt version ${myversion}\"" \
40 https://scan.coverity.com/builds?project=libtom%2Flibtomcrypt