-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathcoverity-report.sh
executable file
·85 lines (65 loc) · 1.78 KB
/
coverity-report.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
80
81
82
83
84
85
#!/bin/bash
# Copyright (c) 2013 Lawrence Livermore National Laboratory
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Peter D. Barnes, Jr. <[email protected]>
#
# Do a coverity build and submit report
#
me=`basename $0`
# echo commands and output to a log file
logf=coverity/coverity-build.log
echo | tee $logf
function say ()
{
echo "$me:" $* | tee -a $logf
}
blank ()
{
echo | tee -a $logf
}
function doo ()
{
say "$ "$*
$* 2>&1 | tee -a $logf
}
say $(date)
blank
doo ./waf clean
blank
doo ./waf configure $NS3CONFIG
blank
cov=coverity/cov-int
doo cov-build --dir $cov ./waf build
blank
tarf=coverity/ns-3.tgz
doo tar cvzf $tarf -C coverity cov-int
blank
useremail=$(hg showconfig ui.username | \
egrep -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b")
repoversion="$(basename $(dirname $PWD))@$(hg id -i)"
# curl complains if this contains white space
description="Coverity-mods"
doo curl \
--form file=@$tarf \
--form project=ns-3 \
--form password=4jk2BVX9 \
--form email="$useremail" \
--form version="$repoversion" \
--form description="$description" \
http://scan5.coverity.com/cgi-bin/upload.py
blank
say $(date)
blank