-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrelease.sh
executable file
·137 lines (103 loc) · 4.97 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/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
release_readme="readme_${release}.md"
echo "# LispBM Release ${release} Test logs" > $reportdir/$release_readme
echo "" >> $reportdir/$release_readme
cd repl
cppcheck32log="../${reportdir}/cppcheck/cppcheck_32bit_${release}.txt"
cppcheck64log="../${reportdir}/cppcheck/cppcheck_64bit_${release}.txt"
./run_cppcheck.sh $cppcheck32log $cppcheck64log
cd ..
cd tests
############################################################
# 32bit tests
unit_tests_log_file="unit_tests_log_${release}.txt"
failing_unit_tests_log_file="failing_unit_tests_log_${release}.txt"
./run_tests.sh ../$reportdir/$failing_unit_tests_log_file >> ../$reportdir/$unit_tests_log_file
echo "" >> ../$reportdir/$release_readme
echo "## 32BIT UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$unit_tests_log_file >> ../$reportdir/$release_readme
############################################################
# 32bit time based scheduler tests
unit_tests_time_log_file="unit_tests_log_${release}.txt"
failing_unit_tests_time_log_file="failing_unit_tests_log_${release}.txt"
./run_tests.sh ../$reportdir/$failing_unit_tests_time_log_file >> ../$reportdir/$unit_tests_time_log_file
echo "" >> ../$reportdir/$release_readme
echo "## 32BIT TIME BASED SCHEDULER UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$unit_tests_time_log_file >> ../$reportdir/$release_readme
############################################################
# 64bit tests
unit_tests_64_log_file="unit_tests_log_64_${release}.txt"
failing_unit_tests_64_log_file="failing_unit_tests_log_64_${release}.txt"
./run_tests64.sh ../$reportdir/$failing_unit_tests_64_log_file >> ../$reportdir/$unit_tests_64_log_file
echo "" >> ../$reportdir/$release_readme
echo "## 64BIT UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$unit_tests_64_log_file >> ../$reportdir/$release_readme
############################################################
# 64bit time based scheduler tests
unit_tests_64_time_log_file="unit_tests_log_64_${release}.txt"
failing_unit_tests_64_time_log_file="failing_unit_tests_log_64_${release}.txt"
./run_tests64.sh ../$reportdir/$failing_unit_tests_64_time_log_file >> ../$reportdir/$unit_tests_64_time_log_file
echo "" >> ../$reportdir/$release_readme
echo "## 64BIT TIME BASED SCHEDULER UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$unit_tests_64_time_log_file >> ../$reportdir/$release_readme
############################################################
# Always GC tests
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_gc.sh ../$reportdir/$failing_gc_unit_tests_log_file >> ../$reportdir/$gc_unit_tests_log_file
echo "" >> ../$reportdir/$release_readme
echo "## ALWAYS GC UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$gc_unit_tests_log_file >> ../$reportdir/$release_readme
############################################################
#Pointer reversal gc tests
revgc_unit_tests_log_file="revgc_unit_tests_log_${release}.txt"
failing_revgc_unit_tests_log_file="failing_revgc_unit_tests_log_${release}.txt"
./run_tests_gc_rev.sh ../$reportdir/$failing_revgc_unit_tests_log_file >> ../$reportdir/$revgc_unit_tests_log_file
echo "" >> ../$reportdir/$release_readme
echo "## POINTER REVERSAL GC UNIT TESTS RESULTS" >> ../$reportdir/$release_readme
tail -n 4 ../$reportdir/$revgc_unit_tests_log_file >> ../$reportdir/$release_readme
############################################################
# Run the 32bit tests for a coverage report.
./run_tests_cov.sh
cd ..
cp -r tests/coverage $reportdir/coverage
echo "" >> ./$reportdir/$release_readme
make clean
if command -v scan-build-18
then
echo "## scan-build version 18" >> ./$reportdir/$release_readme
scan-build-18 -o ./$reportdir/scan-build make -j4 >> ./$reportdir/scan_build_$release.txt
else
if command -v scan-build-14
then
echo "## scan-build version 14" >> ./$reportdir/$release_readme
scan-build-14 -o ./$reportdir/scan-build make -j4 >> ./$reportdir/scan_build_$release.txt
else
if command -v scan-build-10
then
echo "## scan-build version 10" >> ./$reportdir/$release_readme
scan-build-10 -o ./$reportdir/scan-build make -j4 >> ./$reportdir/scan_build_$release.txt
else
echo "scan-build could not be found"
exit 1
fi
fi
fi
tail -n 1 $reportdir/scan_build_$release.txt >> ./$reportdir/$release_readme
make clean
infer run -- make
cp ./infer-out/report.txt $reportdir/infer_${release}.txt
echo "" >> ./$reportdir/$release_readme
echo "## INFER ISSUES" >> ./$reportdir/$release_readme
tail -n 3 $reportdir/infer_${release}.txt >> ./$reportdir/$release_readme