mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
[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.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
REQUIRES: darwin
|
||||
UNSUPPORTED: ios
|
||||
RUN: %cpp_compiler %S/BigFileCopy.cpp -o %t
|
||||
RUN: %run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$?
|
||||
RUN: %run rm -f big-file.txt big-file-out.txt
|
||||
RUN: (exit $result)
|
||||
RUN: bash -c '%run %t -runs=1 -rss_limit_mb=4096 2>big-file-out.txt; result=$? \
|
||||
RUN: %run rm -f big-file.txt big-file-out.txt && exit $result'
|
||||
|
||||
Reference in New Issue
Block a user