[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:
Aiden Grossman
2025-11-19 09:27:38 -08:00
committed by GitHub
parent 1782e501f5
commit ed0c36ca28

View File

@@ -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'