-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rodolphe Lepigre <[email protected]>
- Loading branch information
Showing
15 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/coq_dir1/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(include_subdirs qualified) | ||
(coq.theory | ||
(name theory2)) |
Empty file.
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(coq.theory | ||
(name theory1)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.8) | ||
(using coq 0.8) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/dune-workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 3.8) |
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/project/coq_dir2/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(include_subdirs qualified) | ||
(coq.theory | ||
(name theory4)) |
Empty file.
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/project/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(coq.theory | ||
(name theory3)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/project/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.8) | ||
(using coq 0.8) |
Empty file.
120 changes: 120 additions & 0 deletions
120
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
Running "dune coq top" from different directories in a workspace. The setup is | ||
a workspace whose root is the root of a first project, and a second project is | ||
contained under directory "project". | ||
|
||
$ unset INSIDE_DUNE | ||
$ . ./util.sh | ||
|
||
Calling "dune coq top" from the workspace root. | ||
|
||
$ coqtop_test file1.v | ||
$ coqtop_test coq_dir1/file2.v | ||
$ coqtop_test coq_dir1/dir1/file3.v | ||
$ coqtop_test project/file4.v | ||
$ coqtop_test project/coq_dir2/file5.v | ||
$ coqtop_test project/coq_dir2/dir2/file6.v | ||
|
||
$ check_build | ||
|
||
Calling "dune coq top" from the "coq_dir1" directory. | ||
|
||
$ cd coq_dir1 | ||
|
||
$ coqtop_test ../file1.v | ||
$ coqtop_test ../file1.v | ||
$ coqtop_test ../coq_dir1/file2.v | ||
$ coqtop_test ../coq_dir1/dir1/file3.v | ||
$ coqtop_test ../project/file4.v | ||
$ coqtop_test ../project/coq_dir2/file5.v | ||
$ coqtop_test ../project/coq_dir2/dir2/file6.v | ||
|
||
$ coqtop_test file2.v | ||
$ coqtop_test dir1/file3.v | ||
|
||
$ cd .. | ||
|
||
$ check_build | ||
|
||
Calling "dune coq top" from the "coq_dir1/dir1" directory. | ||
|
||
$ cd coq_dir1/dir1 | ||
|
||
$ coqtop_test ../../file1.v | ||
$ coqtop_test ../../file1.v | ||
$ coqtop_test ../../coq_dir1/file2.v | ||
$ coqtop_test ../../coq_dir1/dir1/file3.v | ||
$ coqtop_test ../../project/file4.v | ||
$ coqtop_test ../../project/coq_dir2/file5.v | ||
$ coqtop_test ../../project/coq_dir2/dir2/file6.v | ||
|
||
$ coqtop_test ../file2.v | ||
$ coqtop_test ../dir1/file3.v | ||
$ coqtop_test file3.v | ||
|
||
$ cd ../.. | ||
|
||
$ check_build | ||
|
||
Calling "dune coq top" from the "project" directory. | ||
|
||
$ cd project | ||
|
||
$ coqtop_test ../file1.v | ||
$ coqtop_test ../coq_dir1/file2.v | ||
$ coqtop_test ../coq_dir1/dir1/file3.v | ||
$ coqtop_test ../project/file4.v | ||
$ coqtop_test ../project/coq_dir2/file5.v | ||
$ coqtop_test ../project/coq_dir2/dir2/file6.v | ||
|
||
$ coqtop_test file4.v | ||
$ coqtop_test coq_dir2/file5.v | ||
$ coqtop_test coq_dir2/dir2/file6.v | ||
|
||
$ cd .. | ||
|
||
$ check_build | ||
|
||
Calling "dune coq top" from the "project/coq_dir2" directory. | ||
|
||
$ cd project/coq_dir2 | ||
|
||
$ coqtop_test ../../file1.v | ||
$ coqtop_test ../../file1.v | ||
$ coqtop_test ../../coq_dir1/file2.v | ||
$ coqtop_test ../../coq_dir1/dir1/file3.v | ||
$ coqtop_test ../../project/file4.v | ||
$ coqtop_test ../../project/coq_dir2/file5.v | ||
$ coqtop_test ../../project/coq_dir2/dir2/file6.v | ||
|
||
$ coqtop_test ../file4.v | ||
$ coqtop_test ../coq_dir2/file5.v | ||
$ coqtop_test ../coq_dir2/dir2/file6.v | ||
$ coqtop_test file5.v | ||
$ coqtop_test dir2/file6.v | ||
|
||
$ cd ../.. | ||
|
||
$ check_build | ||
|
||
Calling "dune coq top" from the "project/coq_dir2/dir2" directory. | ||
|
||
$ cd project/coq_dir2/dir2 | ||
|
||
$ coqtop_test ../../../file1.v | ||
$ coqtop_test ../../../file1.v | ||
$ coqtop_test ../../../coq_dir1/file2.v | ||
$ coqtop_test ../../../coq_dir1/dir1/file3.v | ||
$ coqtop_test ../../../project/file4.v | ||
$ coqtop_test ../../../project/coq_dir2/file5.v | ||
$ coqtop_test ../../../project/coq_dir2/dir2/file6.v | ||
|
||
$ coqtop_test ../../file4.v | ||
$ coqtop_test ../../coq_dir2/file5.v | ||
$ coqtop_test ../../coq_dir2/dir2/file6.v | ||
$ coqtop_test ../file5.v | ||
$ coqtop_test ../dir2/file6.v | ||
$ coqtop_test file6.v | ||
|
||
$ cd ../../.. | ||
|
||
$ check_build |
20 changes: 20 additions & 0 deletions
20
test/blackbox-tests/test-cases/coq/coqtop/coqtop-workspace.t/util.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
export OUTPUT="$PWD/coqtop_test.tmp" | ||
export PWD0="$PWD" | ||
|
||
function coqtop_test() { | ||
(true | (dune coq top "$1" 1>$OUTPUT 2>&1)) || cat $OUTPUT | ||
} | ||
|
||
function check_build() { | ||
if [[ ! -d "./_build" ]]; then | ||
echo "No build directory found..." | ||
exit 1 | ||
fi | ||
|
||
if [[ $(find . -name _build -type d | wc -l) > 1 ]]; then | ||
echo "More than one _build directory..." | ||
exit 1 | ||
fi | ||
} |