Skip to content

Commit

Permalink
test: prefer single file cram test for "deep-subdir"
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 16, 2025
1 parent b869c7c commit 87c7fb1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
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)))
> EOF

Let's create the directory structure we are going to promote (as a copy on
another dir):

Expand All @@ -19,7 +35,25 @@ This one works. Now, let's add a layer between base_file and deep_file:
$ touch deep/a/b/deep_file
$ touch deep/base_file

$ dune build deep_copied
$ dune build deep_copied --verbose
Shared cache: enabled-except-user-rules
Shared cache location: /home/panglesd/.cache/dune/db
Workspace root:
$TESTCASE_ROOT
Dune context:
{ name = "default"
; kind = "default"
; profile = Dev
; merlin = true
; fdo_target_exe = None
; build_dir = In_build_dir "default"
; instrument_with = []
}
Actual targets:
- _build/default/deep_copied
Running[1]: (cd _build/default && /usr/bin/cp -r deep deep_copied)
Promoting "_build/default/deep_copied/a/b/deep_file" to
"deep_copied/a/b/deep_file"
File "dune", lines 1-7, characters 0-121:
1 | (rule
2 | (deps
Expand Down
7 changes: 0 additions & 7 deletions test/blackbox-tests/test-cases/promote/deep-subdir.t/dune

This file was deleted.

This file was deleted.

0 comments on commit 87c7fb1

Please sign in to comment.