forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
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]> Signed-off-by: Ali Caglayan <[email protected]>
- Loading branch information
Showing
6 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/workspaces/root-detection.t/dep/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 @@ | ||
(lang dune 3.8) |
Empty file.
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/workspaces/root-detection.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 @@ | ||
(lang dune 3.8) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/workspaces/root-detection.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) |
53 changes: 53 additions & 0 deletions
53
test/blackbox-tests/test-cases/workspaces/root-detection.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,53 @@ | ||
This test checks the | ||
|
||
$ unset INSIDE_DUNE | ||
|
||
$ ls . dep | ||
.: | ||
dep | ||
dune-project | ||
dune-workspace | ||
test1.opam | ||
|
||
dep: | ||
dune-project | ||
test2.opam | ||
|
||
Testing the root detection for: | ||
|
||
- dune build -p packages | ||
- dune build | ||
- dune clean | ||
|
||
First we test in the workspace root. We expect the root to be the same directory | ||
since that is where the dune-workspace file lives. | ||
|
||
$ dune build -p test2 --verbose |& grep -A 1 'Workspace root:' | ||
Workspace root: | ||
$TESTCASE_ROOT | ||
$ dune build -p test1 --verbose |& grep -A 1 'Workspace root:' | ||
Workspace root: | ||
$TESTCASE_ROOT | ||
$ dune build --verbose |& grep -A 1 'Workspace root:' | ||
Workspace root: | ||
$TESTCASE_ROOT | ||
$ dune clean --verbose |& grep -A 1 'Workspace root:' | ||
Workspace root: | ||
$TESTCASE_ROOT | ||
|
||
Next we try inside the dep directory. We expect the root to be the parent | ||
directory since that is where the dune-workspace file lives. However strangely | ||
for -p this doesn't appear to be the case. | ||
|
||
$ (cd dep && dune build -p test2 --verbose |& grep -A 1 'Workspace root:') | ||
Workspace root: | ||
$TESTCASE_ROOT/dep | ||
$ (cd dep && dune build -p test1 --verbose |& grep -A 1 'Workspace root:') | ||
Workspace root: | ||
$TESTCASE_ROOT/dep | ||
$ (cd dep && dune build --verbose |& grep -A 1 'Workspace root:') | ||
Workspace root: | ||
$TESTCASE_ROOT | ||
$ (cd dep && dune clean --verbose |& grep -A 1 'Workspace root:') | ||
Workspace root: | ||
$TESTCASE_ROOT |
Empty file.