[Openmp-commits] [openmp] dd5ba4b - [OpenMP][NFC] Fix `not` sustitution in tests

Joel E. Denny via Openmp-commits openmp-commits at lists.llvm.org
Mon May 11 11:54:44 PDT 2020


Author: Joel E. Denny
Date: 2020-05-11T14:53:48-04:00
New Revision: dd5ba4b5850756c9eb715c5eb5d7f46bb4db33af

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

LOG: [OpenMP][NFC] Fix `not` sustitution in tests

D78566 introduced a `\bnot\b` lit substitution in OpenMP test suites.
However, that would corrupt a command like
`FileCheck -implicit-check-not` or any file name like `%t.not`.  We
could use lookbehind/lookahead assertions to avoid such cases, but
this patch switches to `%not` (suggested during the D78566 review) as
a safer option.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D79529

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
    openmp/libomptarget/test/lit.cfg
    openmp/runtime/test/lit.cfg
    openmp/tools/archer/tests/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg b/openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
index d9f8bd779f2d..a7a327cd4d14 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
+++ b/openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
@@ -67,4 +67,4 @@ config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
 config.substitutions.append(("%flags", config.test_flags))
 
 config.substitutions.append(("%run", "%t"))
-config.substitutions.append((r"\bnot\b", config.libomptarget_not))
+config.substitutions.append(("%not", config.libomptarget_not))

diff  --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg
index 68182261646c..3cc0b83d27ba 100644
--- a/openmp/libomptarget/test/lit.cfg
+++ b/openmp/libomptarget/test/lit.cfg
@@ -103,7 +103,7 @@ for libomptarget_target in config.libomptarget_all_targets:
             "%t-" + libomptarget_target))
         config.substitutions.append(("%libomptarget-run-fail-" + \
             libomptarget_target, \
-            "not %t-" + libomptarget_target))
+            "%not %t-" + libomptarget_target))
         config.substitutions.append(("%clangxx-" + libomptarget_target, \
             "%clangxx %openmp_flags %flags -fopenmp-targets=" + libomptarget_target))
         config.substitutions.append(("%clang-" + libomptarget_target, \
@@ -146,4 +146,4 @@ config.substitutions.append(("%clangxx", config.test_cxx_compiler))
 config.substitutions.append(("%clang", config.test_c_compiler))
 config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
 config.substitutions.append(("%flags", config.test_flags))
-config.substitutions.append((r"\bnot\b", config.libomptarget_not))
+config.substitutions.append(("%not", config.libomptarget_not))

diff  --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 9a9090660f8c..65ff481f6e5e 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -127,7 +127,7 @@ config.substitutions.append(("%clang", config.test_c_compiler))
 config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
 config.substitutions.append(("%flags", config.test_flags))
 config.substitutions.append(("%python", '"%s"' % (sys.executable)))
-config.substitutions.append((r"\bnot\b", config.test_not))
+config.substitutions.append(("%not", config.test_not))
 
 if config.has_ompt:
     config.substitutions.append(("FileCheck", "tee %%t.out | %s" % config.test_filecheck))

diff  --git a/openmp/tools/archer/tests/lit.cfg b/openmp/tools/archer/tests/lit.cfg
index 514976a9aaef..aa8a24073568 100644
--- a/openmp/tools/archer/tests/lit.cfg
+++ b/openmp/tools/archer/tests/lit.cfg
@@ -111,7 +111,7 @@ config.substitutions.append(("%suppression", "env TSAN_OPTIONS='ignore_noninstru
 config.substitutions.append(("%deflake", os.path.join(os.path.dirname(__file__), "deflake.bash")))
 
 config.substitutions.append(("FileCheck", config.test_filecheck))
-config.substitutions.append((r"\bnot\b", config.test_not))
+config.substitutions.append(("%not", config.test_not))
 config.substitutions.append(("%sort-threads", "sort --numeric-sort --stable"))
 if config.operating_system == 'Windows':
     # No such environment variable on Windows.


        


More information about the Openmp-commits mailing list