Debian Codegraph @

test-suite/misc/qed-time.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 set -ex
4
5 export COQBIN=$BIN
6 export PATH=$COQBIN:$PATH
7
8 cd misc/qed-time/
9
10 # This test checks that the Qed time includes the time of the replayed command
11
12 # The version of this test in output-modulo-time checks that each
13 # command gets 1 time line, but because output-modulo-time normalizes
14 # times to 0 it can't check that the replayed command is not ignored
15
16 rocq c -time file.v > out
17
18 last=$(tail -n 1 out)
19
20 last=${last#"Chars 98 - 102 [Qed.] "}
21 last=${last%" secs"*}
22
23 # sanity check: regex produces a float
24 [[ $last =~ [0-9]+"."[0-9]* ]]
25
26 test() {
27 printf 'if %s <= 0.9:\n\texit (1)\n' "$1" | python3
28 }
29
30 # sanity checks: python works on the code we produce
31 if test 0.9; then exit 1; fi
32 test 1.
33 test 1.1
34
35 test "$last"