Skip to content

Commit ed0c36c

Browse files
[Fuzzer] make big-file-copy.test work with the internal shell (#168658)
This patch uses several shell features not supported by the internal shell, such as $? to get the exit code of a command, and exit. This patch adjusts the test to work with the internal shell by using bash to run the actual command with a zero exit code to ensure the file is deleted, and python to propagate the exit code up to lit.
1 parent 1782e50 commit ed0c36c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
REQUIRES: darwin
22
UNSUPPORTED: ios
33
RUN: %cpp_compiler %S/BigFileCopy.cpp -o %t
4-
RUN: %run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$?
5-
RUN: %run rm -f big-file.txt big-file-out.txt
6-
RUN: (exit $result)
4+
RUN: bash -c '%run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$? \
5+
RUN: %run rm -f big-file.txt big-file-out.txt && exit $result'

0 commit comments

Comments
 (0)