Debian Codegraph @

test-suite/misc/deps-order-distinct-root.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 # Check that both coqdep and coqtop/coqc support -R
3 # Check that both coqdep and coqtop/coqc takes -R preferably to installed $ROCQPATH
4 # See also bugs #2242, #2337, #2339
5
6 set -ex
7
8 export PATH=$BIN:$PATH
9
10 cd misc/deps/DistinctRoot
11 rmscip-shell system . . rm. -rf _test
12 mkdirscip-shell system . . mkdir. _test
13 findscip-shell system . . find. . -maxdepth 1 -not -name . -not -name _test -exec cp -r '{}' -t _test ';'
14 cd _test
15
16 if ! rocq dep -worker @ROCQWORKER@ -R A A -R B B A/File1.v A/File11.v B/File1.v File2.v > coqdep1.real 2>&1; then
17 catscip-shell system . . cat. coqdep1.real
18 exit 1
19 fi
20 diffscip-shell system . . diff. -u --strip-trailing-cr coqdep1.out coqdep1.real || truescip-shell system . . true.
21
22 touchscip-shell system . . touch. A/File1.vo # bad vo, must not be loaded
23 rocq c -R A A -R B B A/File11.v
24 rocq c -R A A -R B B B/File1.v
25
26 # now test with A "installed"
27 mkdirscip-shell system . . mkdir. install
28 cpscip-shell system . . cp. -r A install/A
29 export ROCQPATH=install
30 if ! rocq dep -worker @ROCQWORKER@ -R B B B/File1.v File2.v > coqdep2.real 2>&1; then
31 catscip-shell system . . cat. coqdep2.real
32 exit 1
33 fi
34 diffscip-shell system . . diff. -u --strip-trailing-cr coqdep2.out coqdep2.real
35 rocq c -R B B File2.v
36
37 rmscip-shell system . . rm. A/File1.vo
38 if ! rocq dep -worker @ROCQWORKER@ -R A A -R B B A/File1.v A/File11.v B/File1.v File2.v > coqdep3.real 2>&1; then
39 catscip-shell system . . cat. coqdep3.real
40 exit 1
41 fi
42 # reuse coqdep1.out: output should be same as first rocq dep run
43 diffscip-shell system . . diff. -u --strip-trailing-cr coqdep1.out coqdep3.real
44 rocq c -R A A -R B B File2.v