[clang] a1bca4b - [clang] Make tests write to /dev/null if output is not needed (#135242)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 12:50:09 PDT 2025


Author: Pranav Kant
Date: 2025-04-10T12:50:05-07:00
New Revision: a1bca4ba3714bffac5dc27d286b5bd4fcdcc40ab

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

LOG: [clang] Make tests write to /dev/null if output is not needed (#135242)

We execute tests in read only environment which leads to test failure
when tests try to write to the current directory. Either they should
write to a temporary directory or not write if output is not needed.

Fallback from #134717

Added: 
    

Modified: 
    clang/test/Driver/openacc-no-cir.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/openacc-no-cir.c b/clang/test/Driver/openacc-no-cir.c
index 7b67df2b6b886..891f175a001bb 100644
--- a/clang/test/Driver/openacc-no-cir.c
+++ b/clang/test/Driver/openacc-no-cir.c
@@ -1,6 +1,6 @@
-// RUN: %clang -fopenacc -S %s 2>&1 | FileCheck %s -check-prefix=ERROR
-// RUN: %clang -fclangir -fopenacc -S %s 2>&1 | FileCheck %s --allow-empty -check-prefix=NOERROR
-// RUN: %clang -fopenacc -fclangir -S %s 2>&1 | FileCheck %s --allow-empty -check-prefix=NOERROR
+// RUN: %clang -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=ERROR
+// RUN: %clang -fclangir -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s --allow-empty -check-prefix=NOERROR
+// RUN: %clang -fopenacc -fclangir -S %s -o /dev/null 2>&1 | FileCheck %s --allow-empty -check-prefix=NOERROR
 
 // ERROR: OpenACC directives will result in no runtime behavior; use -fclangir to enable runtime effect
 // NOERROR-NOT: OpenACC directives


        


More information about the cfe-commits mailing list