diff --git a/test/Integration/Truncate/Cpp/log.cpp b/test/Integration/Truncate/Cpp/log.cpp index d1cc00a1..5cd06b09 100644 --- a/test/Integration/Truncate/Cpp/log.cpp +++ b/test/Integration/Truncate/Cpp/log.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -O3 %s -o %t.a.out %loadClangRaptor %linkRaptorRT %includeRaptorRT -lm && RAPTOR_FLOP_LOG_PREFIX=%t.flop_log %t.a.out && xxd %t.flop_log.double | FileCheck %s +// RUN: %clang -O3 %s -o %t.a.out %loadClangRaptor %linkRaptorRT %includeRaptorRT -lm && env RAPTOR_FLOP_LOG_PREFIX=%t.flop_log %t.a.out && xxd %t.flop_log.double | FileCheck %s // CHECK: 00000000: 0000 0000 0000 f03f 0000 0000 0000 0040 // CHECK: 00000010: 0000 0000 0000 0840 0000 0000 0000 0040 diff --git a/test/Integration/Truncate/Cpp/openmp-gpu.cpp b/test/Integration/Truncate/Cpp/openmp-gpu.cpp index 671b4d93..0a394ed6 100644 --- a/test/Integration/Truncate/Cpp/openmp-gpu.cpp +++ b/test/Integration/Truncate/Cpp/openmp-gpu.cpp @@ -1,7 +1,7 @@ // clang-format off // RUN: %clang -O3 %s -o %t.a.out %loadClangRaptor %linkRaptorRT -lm -lmpfr && %t.a.out // RUN: %clang -O3 -fopenmp %s -o %t.a.out %loadClangRaptor %linkRaptorRT -lm -lmpfr && %t.a.out -// RUN: if [ "%hasOpenMPGPU" == "1" ]; then %clang -O3 -fopenmp --offload-arch=native -nogpulib %s -o %t.a.out %loadClangRaptor %linkRaptorRT -lm -lmpfr && %t.a.out; fi +// RUN: python3 -c "import sys; sys.exit(1 if '%hasOpenMPGPU' == '1' else 0)" || %clang -O3 -fopenmp --offload-arch=native -nogpulib %s -o %t.a.out %loadClangRaptor %linkRaptorRT -lm -lmpfr && %t.a.out // clang-format on #include "../../test_utils.h" diff --git a/test/Unit/Truncate/cmp.ll b/test/Unit/Truncate/cmp.ll index 587ba405..2dfa663d 100644 --- a/test/Unit/Truncate/cmp.ll +++ b/test/Unit/Truncate/cmp.ll @@ -1,4 +1,4 @@ -; RUN: if [ %llvmver -lt 16 ]; then %opt < %s %loadRaptor -raptor -S | FileCheck %s; fi +; RUN: python3 -c "import sys; sys.exit(1 if (%llvmver < 16) else 0)" || %opt < %s %loadRaptor -raptor -S | FileCheck %s ; RUN: %opt < %s %newLoadRaptor -passes="raptor" -S | FileCheck %s define i1 @f(double %x, double %y) { diff --git a/test/Unit/Truncate/const.ll b/test/Unit/Truncate/const.ll index ed77fcd3..d7124e2e 100644 --- a/test/Unit/Truncate/const.ll +++ b/test/Unit/Truncate/const.ll @@ -1,5 +1,5 @@ -; RUN: if [ %llvmver -gt 12 ]; then if [ %llvmver -lt 16 ]; then %opt < %s %loadRaptor -raptor -S | FileCheck %s; fi; fi -; RUN: if [ %llvmver -gt 12 ]; then %opt < %s %newLoadRaptor -passes="raptor" -S | FileCheck %s; fi +; RUN: python3 -c "import sys; sys.exit(1 if (%llvmver > 12 and %llvmver < 16) else 0)" || %opt < %s %loadRaptor -raptor -S | FileCheck %s +; RUN: python3 -c "import sys; sys.exit(1 if (%llvmver > 12) else 0)" || %opt < %s %newLoadRaptor -passes="raptor" -S | FileCheck %s define double @f(double %x) { %res = fadd double %x, 1.0 diff --git a/test/Unit/Truncate/value.ll b/test/Unit/Truncate/value.ll index 6d6a4b92..e029ef7d 100644 --- a/test/Unit/Truncate/value.ll +++ b/test/Unit/Truncate/value.ll @@ -1,5 +1,5 @@ -; RUN: if [ %llvmver -gt 12 ]; then if [ %llvmver -lt 16 ]; then %opt < %s %loadRaptor -raptor -S | FileCheck %s; fi; fi -; RUN: if [ %llvmver -gt 12 ]; then %opt < %s %newLoadRaptor -passes="raptor" -S | FileCheck %s; fi +; RUN: python3 -c "import sys; sys.exit(1 if (%llvmver > 12 and %llvmver < 16) else 0)" || %opt < %s %loadRaptor -raptor -S | FileCheck %s +; RUN: python3 -c "import sys; sys.exit(1 if (%llvmver > 12) else 0)" || %opt < %s %newLoadRaptor -passes="raptor" -S | FileCheck %s declare double @__raptor_truncate_mem_value(double, i64, i64) declare double @__raptor_expand_mem_value(double, i64, i64) diff --git a/test/lit.cfg.py b/test/lit.cfg.py index 29683ebc..97687083 100644 --- a/test/lit.cfg.py +++ b/test/lit.cfg.py @@ -18,8 +18,8 @@ # # For now we require '&&' between commands, until they get globally killed and # the test runner updated. -execute_external = platform.system() != 'Windows' -config.test_format = lit.formats.ShTest(execute_external) +# execute_external = platform.system() != 'Windows' +config.test_format = lit.formats.ShTest(execute_external=False) # suffixes: A list of file extensions to treat as test files. config.suffixes = ['.mlir', '.ll', '.c', '.cpp', '.cu', '.f90']