Debian Codegraph @

test-suite/coq-makefile/timing-per-file/run.sh

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #!/usr/bin/env bash
2
3 . ../timing-template/init.sh
4
5 rm -rf _test
6 mkdir _test
7 find . -maxdepth 1 -not -name . -not -name _test -exec cp -r '{}' -t _test ';'
8 cd _test
9
10 # we delete the timings for coqdep because they're too close to 0
11 # so testing them is hard
12
13 cd before/
14 rocq makefile -f _CoqProject -o Makefile
15 make cleanall
16 make make-pretty-timed-before TGTS="all" -j1 || exit $?
17 sed -i.bak 's/.Makefile.d .*/.Makefile.d (ignored)/' time-of-build-before.log
18
19 cd ../after/
20
21 rocq makefile -f _CoqProject -o Makefile
22 make cleanall
23
24 make make-pretty-timed-after TGTS="all" -j1 || exit $?
25 rm -f time-of-build-before.log
26 sed -i.bak 's/.Makefile.d .*/.Makefile.d (ignored)/' time-of-build-after.log
27
28 make print-pretty-timed-diff TIMING_SORT_BY=diff TIME_OF_BUILD_BEFORE_FILE=../before/time-of-build-before.log
29 cp ../before/time-of-build-before.log ./
30
31 make print-pretty-timed-diff TIMING_SORT_BY=diff || exit $?
32
33 for file in time-of-build-before.log time-of-build-after.log time-of-build-both.log; do
34 for ext in "" .desired; do
35 sed "${TO_SED_IN_BOTH[@]}" "${TO_SED_IN_PER_FILE[@]}" ${file}${ext} > ${file}${ext}.processed
36 done
37 echo "cat $file"
38 cat "$file"
39 echo
40 diff -u $file.desired.processed $file.processed || exit $?
41 done