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.
Demonstrate target promotion bug (ocaml#5292)
Signed-off-by: Andrey Mokhov <[email protected]>
- Loading branch information
1 parent
4db21fe
commit f9dfb2f
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
test/blackbox-tests/test-cases/promote/promote-only-when-needed.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,23 @@ | ||
Test that targets aren't re-promoted if they are up to date. | ||
|
||
$ echo "(lang dune 3.0)" > dune-project | ||
$ cat >dune <<EOF | ||
> (rule | ||
> (targets promoted) | ||
> (mode promote) | ||
> (action (with-stdout-to promoted (echo "Hello, world!")))) | ||
> EOF | ||
|
||
$ dune build promoted --verbose 2>&1 | grep "Promoting" | ||
Promoting "_build/default/promoted" to "promoted" | ||
$ cat promoted | ||
Hello, world! | ||
|
||
Bug: Dune promotes the file again even though its unchanged. | ||
|
||
# CR-someday amokhov: Fix this. | ||
|
||
$ dune build promoted --verbose 2>&1 | grep "Promoting" | ||
Promoting "_build/default/promoted" to "promoted" | ||
$ cat promoted | ||
Hello, world! |