-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(pkg): show precedence of make and gmake (#8750)
Signed-off-by: Ali Caglayan <[email protected]>
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
test/blackbox-tests/test-cases/pkg/opam-var/make-over-gmake.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,24 @@ | ||
$ . ./opam-var-helpers.sh | ||
|
||
If both make and gmake are available, we should prefer make. | ||
|
||
opam doesn't resolve make but rather runs make literally so it is up to whatever is in | ||
PATH to resolve it. This does mean that make is preferred over gmake so we should | ||
replicate that behaviour. | ||
|
||
We create a dummy package that will output the value of the opam make variable: | ||
$ mkrepo | ||
> mkpkg testpkg << EOF | ||
> opam-version: "2.0" | ||
> build: [ "echo" make ] | ||
> EOF | ||
> solve testpkg 2> /dev/null | ||
|
||
We now create dummy versions of make and gmake. | ||
$ cat > make; cat > gmake | ||
We add the current directory to PATH. Dune will expand %{make} and should prefer make over | ||
gmake. | ||
$ PATH=.:$PATH | ||
> build_pkg testpkg | ||
$TESTCASE_ROOT/gmake | ||
|