-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cram: demonstrate bug with
%{bin:public_binary}
and absolute DUNE_B…
…UILD_DIR Signed-off-by: Antonio Nuno Monteiro <[email protected]>
- Loading branch information
1 parent
83aea14
commit 848cdfe
Showing
4 changed files
with
39 additions
and
2 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
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
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
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,32 @@ | ||
Cram and public binaries with an absolute build directory | ||
|
||
$ mkdir fresh && cd fresh | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 2.8) | ||
> (cram enable) | ||
> (name public-name-exe-test) | ||
> EOF | ||
$ touch public-name-exe-test.opam | ||
|
||
$ mkdir helper | ||
$ cat >helper/dune <<EOF | ||
> (executable (public_name helper)) | ||
> EOF | ||
$ cat >helper/helper.ml <<EOF | ||
> print_endline "Helper launched successfully";; | ||
> EOF | ||
|
||
$ mkdir tests | ||
$ cat >tests/run.t <<EOF | ||
> $ helper | ||
> Helper launched successfully | ||
> EOF | ||
$ echo "(cram (deps %{bin:helper}))" > tests/dune | ||
|
||
Running `dune runtest` with a relative build directory works | ||
|
||
$ DUNE_BUILD_DIR=./_other_build dune runtest | ||
|
||
$ export NEW_BUILD_DIR="$PWD/_other_build" | ||
$ DUNE_BUILD_DIR="$NEW_BUILD_DIR" dune runtest --auto-promote |