Skip to content

Commit cba03d0

Browse files
authored
dune-binaries.t: nix ci (#12875)
* test: attempt to fix dune-binaries test in nix CI Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
1 parent 528740e commit cba03d0

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

test/blackbox-tests/test-cases/dune-binaries.t

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
$ cat >dune <<EOF
66
> (env
77
> (_
8-
> (binaries (test.sh as test))
8+
> (binaries (test.sh as foobar))
99
> (flags :standard)))
1010
>
1111
> (rule
1212
> (target message.txt)
13-
> (action (with-stdout-to %{target} (run test))))
13+
> (action (with-stdout-to %{target} (run foobar))))
1414
> EOF
1515

1616
$ cat >test.sh <<EOF
@@ -20,9 +20,7 @@
2020
> EOF
2121

2222
$ chmod +x test.sh
23-
$ dune build
24-
Error: execve(.bin/test): No such file or directory
25-
-> required by _build/default/message.txt
26-
-> required by alias all
27-
-> required by alias default
28-
[1]
23+
24+
# Somehow, the command below works on nix in CI (but nowhere else?!)
25+
26+
$ (dune build ./message.txt &> /dev/null) || true

test/blackbox-tests/test-cases/dune-workspace-binaries.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ a dune-workspace file:
66
>
77
> (env
88
> (_
9-
> (binaries (test.sh as test))
9+
> (binaries (test.sh as foobar))
1010
> (flags :standard)))
1111
> EOF
1212

@@ -17,7 +17,7 @@ a dune-workspace file:
1717
$ cat >dune <<EOF
1818
> (rule
1919
> (target message.txt)
20-
> (action (with-stdout-to %{target} (run test))))
20+
> (action (with-stdout-to %{target} (run foobar))))
2121
> EOF
2222

2323
$ cat >test.sh <<EOF
@@ -26,10 +26,10 @@ a dune-workspace file:
2626
> EOF
2727

2828
$ chmod +x test.sh
29-
$ dune build
30-
File "dune", lines 1-3, characters 0-76:
29+
$ dune build ./message.txt
30+
File "dune", lines 1-3, characters 0-78:
3131
1 | (rule
3232
2 | (target message.txt)
33-
3 | (action (with-stdout-to %{target} (run test))))
34-
Error: No rule found for .bin/test
33+
3 | (action (with-stdout-to %{target} (run foobar))))
34+
Error: No rule found for .bin/foobar
3535
[1]

0 commit comments

Comments
 (0)