Skip to content

Commit

Permalink
Demonstrate target promotion bug (ocaml#5292)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Mokhov <[email protected]>
  • Loading branch information
snowleopard authored Dec 13, 2021
1 parent 4db21fe commit f9dfb2f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/blackbox-tests/test-cases/promote/promote-only-when-needed.t
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!

0 comments on commit f9dfb2f

Please sign in to comment.