Debian Codegraph @

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

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 #!/usr/bin/bashscip-shell filesystem . . `/usr/bin/bash`.
2
3 . ../timing-template/init.shscip-shell source . . `../timing-template/init.sh`.
4
5 rmscip-shell system . . rm. -rf _test
6 mkdirscip-shell system . . mkdir. _test
7 findscip-shell system . . 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 makescip-shell system . . make. cleanall
16 makescip-shell system . . make. make-pretty-timed-before TGTS="all" -j1 || exit $?
17 sedscip-shell system . . 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 makescip-shell system . . make. cleanall
23
24 makescip-shell system . . make. make-pretty-timed-after TGTS="all" -j1 || exit $?
25 rmscip-shell system . . rm. -f time-of-build-before.log
26 sedscip-shell system . . sed. -i.bak 's/.Makefile.d .*/.Makefile.d (ignored)/' time-of-build-after.log
27
28 makescip-shell system . . make. print-pretty-timed-diff TIMING_SORT_BY=diff TIME_OF_BUILD_BEFORE_FILE=../before/time-of-build-before.log
29 cpscip-shell system . . cp. ../before/time-of-build-before.log ./
30
31 makescip-shell system . . 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 sedscip-shell system . . sed. "${TO_SED_IN_BOTH[@]}" "${TO_SED_IN_PER_FILE[@]}" ${file}${ext} > ${file}${ext}.processed
36 done
37 echoscip-shell system . . echo. "cat $file"
38 catscip-shell system . . cat. "$file"
39 echoscip-shell system . . echo.
40 diffscip-shell system . . diff. -u $file.desired.processed $file.processed || exit $?
41 done