/
release.sh
executable file
·57 lines (39 loc) · 1.32 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
#!/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
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_tests.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
cd ..
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