3 # To use this script, build Tor with coverage enabled, and then say:
4 # ./scripts/test/cov-test-determinism.sh run
6 # Let it run for a long time so it can run the tests over and over. It
7 # will put their coverage outputs in coverage-raw/coverage-*/.
10 # ./scripts/test/cov-test-determinism.sh check
12 # It will diff the other coverage outputs to the first one, and put their
13 # diffs in coverage-raw/diff-coverage-*.
18 if test "$1" = run
; then
20 elif test "$1" = check
; then
23 echo "First use 'run' with this script, then use 'check'."
27 if test "$run" = 1; then
28 # same seed as in travis.yml
29 TOR_TEST_RNG_SEED
="636f766572616765"
30 export TOR_TEST_RNG_SEED
33 CD
=coverage-raw
/coverage-$
(date +%s
)
36 .
/scripts
/test
/coverage
"$CD"
40 if test "$check" = 1; then
41 cd coverage-raw ||
exit 1
43 FIRST
="$(find . -name "coverage-
*" -type d | head -1)"
46 for dir
in coverage-
*; do
49 ..
/scripts
/test
/cov-diff A B
> "diff-$dir"