-
Notifications
You must be signed in to change notification settings - Fork 412
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: Ambre Austen Suhamy <[email protected]>
- Loading branch information
1 parent
797970b
commit d3fddfe
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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,39 @@ | ||
Tests for promoting directory targets | ||
------------------------------------- | ||
|
||
$ cat > dune-project << EOF | ||
> (lang dune 3.0) | ||
> (using directory-targets 0.1) | ||
> EOF | ||
|
||
$ cat > dune << EOF | ||
> (rule | ||
> (deps | ||
> (source_tree deep)) | ||
> (targets | ||
> (dir deep_copied)) | ||
> (mode promote) | ||
> (action | ||
> (run cp -r deep deep_copied))) | ||
|
||
Let's create the directory structure we are going to promote | ||
(as a copy on another dir): | ||
|
||
$ mkdir -p deep/a/ | ||
$ touch deep/a/deep_file | ||
$ touch deep/base_file | ||
|
||
Let's try this: | ||
|
||
$ dune build deep_copied | ||
|
||
This one works. Now, let's add a layer between base_file and deep_file: | ||
|
||
$ rm -rf deep | ||
$ mkdir -p deep/a/b/ | ||
$ touch deep/a/b/deep_file | ||
$ touch deep/base_file | ||
|
||
$ dune build deep_copied | ||
|
||
It now works! |