| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Check that both coqdep and coqtop/coqc supports -R |
| 3 | # Check that both coqdep and coqtop/coqc takes -R preferably to installed $ROCQPATH |
| 4 | # See bugs 2242, 2337, 2339 |
| 5 | rmscip-shell system . . rm. -f misc/deps/lib/*.vo misc/deps/client/*.vo |
| 6 | output=misc/deps/deps.real |
| 7 | |
| 8 | $coqdep -worker @ROCQWORKER@ -R misc/deps/lib lib -R misc/deps/client client misc/deps/client/bar.v 2>&1 | headscip-shell system . . head. -n 1 > "$output" |
| 9 | diffscip-shell system . . diff. -u --strip-trailing-cr misc/deps/deps.out "$output" 2>&1 |
| 10 | R=$? |
| 11 | times |
| 12 | $coqc -R misc/deps/lib lib misc/deps/lib/foo.v 2>&1 |
| 13 | $coqc -R misc/deps/lib lib -R misc/deps/client client misc/deps/client/foo.v 2>&1 |
| 14 | export ROCQPATH=misc/deps |
| 15 | $coqc -R misc/deps/client client misc/deps/client/bar.v 2>&1 |
| 16 | S=$? |
| 17 | if [scip-shell system . . `[`. $R = 0 ] && [scip-shell system . . `[`. $S = 0 ]; then |
| 18 | printfscip-shell system . . printf. "coqdep and coqc agree\n" |
| 19 | exit 0 |
| 20 | else |
| 21 | printfscip-shell system . . printf. "coqdep and coqc disagree\n" |
| 22 | exit 1 |
| 23 | fi |