Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for promoting from a nonexistent subdir #3502

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,17 @@
test-cases/no-name-field
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

(rule
(alias nonexistent-subdir)
(deps
(package dune)
(source_tree test-cases/nonexistent-subdir)
(alias test-deps))
(action
(chdir
test-cases/nonexistent-subdir
(progn (run dune-cram run run.t) (diff? run.t run.t.corrected)))))

(rule
(alias null-dep)
(deps (package dune) (source_tree test-cases/null-dep) (alias test-deps))
Expand Down Expand Up @@ -3197,6 +3208,7 @@
(alias no-infer)
(alias no-installable-mode)
(alias no-name-field)
(alias nonexistent-subdir)
(alias null-dep)
(alias ocaml-config-macro)
(alias ocaml-syntax)
Expand Down Expand Up @@ -3479,6 +3491,7 @@
(alias no-infer)
(alias no-installable-mode)
(alias no-name-field)
(alias nonexistent-subdir)
(alias null-dep)
(alias ocaml-config-macro)
(alias ocaml-syntax)
Expand Down
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/nonexistent-subdir/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(subdir "x"
(rule
(mode (promote (until-clean)))
(action (with-stdout-to y (echo "z")))))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.5)
4 changes: 4 additions & 0 deletions test/blackbox-tests/test-cases/nonexistent-subdir/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Check that promoting from a nonexistent subdir doesn't cause crashes.
$ dune build x/y
$ cat x/y
z