Skip to content

Commit 968f8ec

Browse files
committed
chore: minor test cleanups
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
1 parent ab957ce commit 968f8ec

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/blackbox-tests/test-cases/cram/subprocess.t

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ project with a single cram test.
77

88
We create a file for tracking the PID of a subprocess.
99

10-
$ cat > pid.txt
11-
$ export FILE=$(realpath ./pid.txt)
10+
$ FILE=$(realpath ./pid.txt)
1211

1312
We create a cram test that spawns a subprocess and records its PID in the file
1413
we gave before.
@@ -20,10 +19,12 @@ we gave before.
2019

2120
We can now run this test, which will record its PID in the file.
2221

23-
$ dune build @mycram
22+
$ dune runtest mycram.t
2423

2524
The test finished successfully, now we make sure that the PID was correctly
2625
terminated.
2726

27+
$ [ -s $FILE ] && echo pid file created
28+
pid file created
2829
$ ps -p $(cat $FILE) > /dev/null || echo "Process terminated"
2930
Process terminated

0 commit comments

Comments
 (0)