-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmk_coverage_27_refactor
More file actions
executable file
·36 lines (28 loc) · 1.26 KB
/
mk_coverage_27_refactor
File metadata and controls
executable file
·36 lines (28 loc) · 1.26 KB
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
./mk_clean
cd artifacts
set -xe
gcc -O0 -m32 --coverage -I ../tcc_27_refactor/ -I ../tcc_27_refactor/include/ ../tcc_27_refactor/tcc.c -DONE_SOURCE -o coverage.exe -ldl
# we have to symlink since tcc will include the file name in the object code
# file which then causes hashes not to match
ln -s ../tcc_27/libc_boot4.c libc_boot4.c
ln -s ../tcc_27/libc_static.c libc_static.c
ln -s ../tcc_27/tcc.c tcc.c
ln -s ../M2_simple_asm.c M2_simple_asm.c
ln -s ../M2_tcc_js_simple.c M2_tcc_js_simple.c
mkdir lib
cd lib
ln -s ../../tcc_27/lib/libtcc1.c libtcc1.c
cd ..
# I *think* multiple runs will aggregate the profiles, try for now
./coverage.exe -I ../../tcc_bootstrap_alt/woody/usr/include/ -I ../tcc_27/include -I ../tcc_27/ -c tcc.c -U__linux__ -DONE_SOURCE -o tcc.o
./coverage.exe -c ./lib/libtcc1.c -o libtcc1.o
./coverage.exe -c libc_boot4.c -o libc_boot4.o
./coverage.exe -c libc_static.c -o libc_static.o
./coverage.exe -nostdinc -c M2_simple_asm.c -o M2_simple_asm_tcc.o
./coverage.exe -nostdinc -c M2_tcc_js_simple.c -o M2_tcc_js_simple.o
# for some reason we need to be in the directory above to run gcovr?
cd ..
# check the hashes of the test files
sha256sum -c sums_tcc_27
gcovr artifacts --html-details -o artifacts/example.html
~/ffnew/firefox/firefox ./artifacts/example.html