-
Notifications
You must be signed in to change notification settings - Fork 7
/
release.sh
executable file
·72 lines (48 loc) · 1.66 KB
/
release.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
#!/bin/bash
release=$1
if [ -z "$1" ]; then
echo "No arg"
exit 1
fi
reportdir=./test_reports/version_$release
echo $release
echo $reportdir
mkdir -p $reportdir
mkdir -p $reportdir/scan-build
mkdir -p $reportdir/cppcheck
cd repl
cppcheck32log="../${reportdir}/cppcheck/cppcheck_32bit_${release}.txt"
cppcheck64log="../${reportdir}/cppcheck/cppcheck_64bit_${release}.txt"
./run_cppcheck.sh $cppcheck32log $cppcheck64log
cd ..
cd tests
unit_tests_log_file="unit_tests_log_${release}.txt"
failing_unit_tests_log_file="failing_unit_tests_log_${release}.txt"
unit_tests_64_log_file="unit_tests_log_64_${release}.txt"
failing_unit_tests_64_log_file="failing_unit_tests_log_64_${release}.txt"
gc_unit_tests_log_file="gc_unit_tests_log_${release}.txt"
failing_gc_unit_tests_log_file="failing_gc_unit_tests_log_${release}.txt"
./run_tests.sh ../$reportdir/$failing_unit_tests_log_file >> ../$reportdir/$unit_tests_log_file
./run_tests64.sh ../$reportdir/$failing_unit_tests_64_log_file >> ../$reportdir/$unit_tests_64_log_file
./run_tests_gc.sh ../$reportdir/$failing_gc_unit_tests_log_file >> ../$reportdir/$gc_unit_tests_log_file
# Run the 32bit tests for a coverage report.
./run_tests_cov.sh
cd ..
cp -r tests/coverage $reportdir/coverage
if ! command -v scan-build-14 &> /dev/null
then
if ! command -v scan-build-10 &> /dev/null
then
echo "<the_command> could not be found"
exit 1
else
make clean
scan-build-10 -o ./$reportdir/scan-build make -j4
fi
else
make clean
scan-build-14 -o ./$reportdir/scan-build make -j4
fi
make clean
infer run -- make
cp ./infer-out/report.txt $reportdir/infer_${release}.txt