Skip to content

Commit

Permalink
test: use sh in concurrent test (#7205)
Browse files Browse the repository at this point in the history
no need to switch to bash

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Mar 1, 2023
1 parent b8fd9df commit f6deaf9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/blackbox-tests/test-cases/actions/concurrent.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,22 @@ They will block on the read however, which means if called with the same two
pipes but swapped, they will only terminate when both scripts are running at the
same time.
$ cat > run.sh << EOF
> #!/bin/bash
> echo foo>\$1 & read line<\$2
> EOF
$ chmod +x run.sh

We create an action that will create named pipes a and b and then run our script
on both of them, but importantly inside the concurrent action. This will
demonstrate that subactions are indeed being run concurrently.
$ cat > dune << EOF
> (rule
> (deps run.sh)
> (alias my-rule)
> (action
> (progn
> (run mkfifo a b)
> (concurrent
> (run ./run.sh a b)
> (run ./run.sh b a)))))
> (run sh run.sh a b)
> (run sh run.sh b a)))))
> EOF

When we run the rule, we see that the two actions are indeed run concurrently.
Expand Down

0 comments on commit f6deaf9

Please sign in to comment.