[clang] e0e334a - [mac/arm] make clang/test/Driver/clang_f_opts.c pass consistently

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 09:57:28 PST 2020


Author: Nico Weber
Date: 2020-11-23T12:56:52-05:00
New Revision: e0e334a9c1ace7dd9339ca6cb5866ff7b7885e11

URL: https://github.com/llvm/llvm-project/commit/e0e334a9c1ace7dd9339ca6cb5866ff7b7885e11
DIFF: https://github.com/llvm/llvm-project/commit/e0e334a9c1ace7dd9339ca6cb5866ff7b7885e11.diff

LOG: [mac/arm] make clang/test/Driver/clang_f_opts.c pass consistently

Part of PR46644, see comment 7/8.

Added: 
    

Modified: 
    clang/test/Driver/clang_f_opts.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index 27380413b7fe..123ad7e2aa99 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -541,6 +541,12 @@
 // CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line"
 // CHECK-RECORD-GCC-SWITCHES-ERROR: error: unsupported option '-frecord-command-line' for target
 // Test when clang is in a path containing a space.
+// The initial `rm` is a workaround for https://openradar.appspot.com/FB8914243
+// (Scenario: Run tests once, `clang` gets copied and run at new location and signature
+// is cached at the new clang's inode, then clang is changed, tests run again, old signature
+// is still cached with old clang's inode, so it won't execute this time. Removing the dir
+// first guarantees a new inode without old cache entries.)
+// RUN: rm -rf "%t.r/with spaces"
 // RUN: mkdir -p "%t.r/with spaces"
 // RUN: cp %clang "%t.r/with spaces/clang"
 // RUN: "%t.r/with spaces/clang" -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s


        


More information about the cfe-commits mailing list