Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / script / run-coverity
1 #!/bin/sh -ex
2
3 export COVDIR="$HOME/cov-analysis"
4 if [ ! -d "$COVDIR" ]; then
5     echo "missing $COVDIR; get that from coverity!"
6     exit 1
7 fi
8 if [ ! -e "$HOME/coverity.build.pass.txt" ]; then
9     echo "missing $HOME/coverity.build.pass.txt"
10     exit 1
11 fi
12
13 export PATH="$COVDIR/bin:$PATH"
14
15 rm -rf build
16 ./do_cmake.sh
17 cd build
18 ~/cov-analysis/bin/cov-build --dir cov-int make -j$(nproc)
19
20 echo Sage Weil sage@newdream.net ceph >> README
21 tar czvf project.tgz README cov-int
22 rm -f README
23
24 version=`git describe`
25 token=`cat ~/coverity.build.pass.txt`
26 curl --form token=$token \
27   --form email=sage@newdream.net \
28   --form file=@project.tgz \
29   --form version="$version" \
30   --form description="Automated Ceph build from `hostname`" \
31   https://scan.coverity.com/builds?project=ceph
32
33 echo done.