| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Check that coqtop/coqc and coqdep behave the same in the presence of ambiguity |
| 3 | # over child and sibling directories |
| 4 | # Same test as deps-order-subdir1-file.sh but without Theory1/File1.v |
| 5 | |
| 6 | # This test is platform-dependent, we renounce to it |
| 7 | dotest=true |
| 8 | if [scip-shell system . . `[`. $dotest = false ]; then exit 0; fi |
| 9 | rmscip-shell system . . rm. -f misc/deps/Theory2/*.vo misc/deps/Theory2/Subtheory?/*.vo misc/deps/Theory2/Subtheory?/Subsubtheory?/*.vo |
| 10 | output=misc/deps/Theory2Deps.real |
| 11 | (cd misc/deps; $coqdep -worker @ROCQWORKER@ -f _CoqTheory2Project) > "$output" 2>&1 |
| 12 | diffscip-shell system . . diff. -u --strip-trailing-cr misc/deps/Theory2Deps.out $output |
| 13 | R=$? |
| 14 | if [scip-shell system . . `[`. $R != 0 ]; then |
| 15 | printfscip-shell system . . printf. "Unexpected coqdep result.\n" |
| 16 | exit 1 |
| 17 | fi |
| 18 | times |
| 19 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory1/File1.v |
| 20 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory1/Subsubtheory2/File1.v |
| 21 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory1/Subsubtheory2/File1.v |
| 22 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory2/File1.v |
| 23 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory2/Subsubtheory2/File1.v |
| 24 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/Subtheory2/Subsubtheory2/File1.v |
| 25 | $coqc -Q misc/deps/Theory2 Theory misc/deps/Theory2/File2.v |
| 26 | S=$? |
| 27 | if [scip-shell system . . `[`. $S = 0 ]; then |
| 28 | printfscip-shell system . . printf. "Unexpected coqc success.\n" |
| 29 | exit 1 |
| 30 | fi |
| 31 | printfscip-shell system . . printf. "coqdep and coqc ok.\n" |