[PATCH] D68863: [LNT] Python 3 support: don't assume order of cmake args

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 03:31:34 PDT 2019


thopre created this revision.
thopre added reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls.
thopre added a parent revision: D68829: [LNT] Python 3 support: Parse HTML as text.

runtest/test_suite-cache.shtest test assumes the order of cmake argument
but that order changes between Python 2 and Python 3. Since there is no
good reason to have them sorted, this commit adapts the testcase to
accept any order by testing each argument in a separate FileCheck
invokation.


https://reviews.llvm.org/D68863

Files:
  tests/runtest/test_suite-cache.shtest


Index: tests/runtest/test_suite-cache.shtest
===================================================================
--- tests/runtest/test_suite-cache.shtest
+++ tests/runtest/test_suite-cache.shtest
@@ -14,8 +14,16 @@
 # RUN:     --cmake-define FOO=BAR \
 # RUN:     -D BAR=BAZ \
 # RUN:     &> %t.cmake-cache.log
-# RUN: FileCheck  --check-prefix CHECK-CACHE < %t.cmake-cache.log %s
-# CHECK-CACHE: Execute: {{.*}}cmake -DCMAKE_CXX_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang++-r154331 -DCMAKE_C_COMPILER:FILEPATH={{.*}}FakeCompilers/clang-r154331 -C {{.*}}/Release.cmake {{.*}}-DFOO=BAR{{.*}}-DBAR=BAZ
+# RUN: FileCheck  --check-prefix CHECK-CACHE1 < %t.cmake-cache.log %s
+# CHECK-CACHE1: Execute: {{.*}}cmake {{(.+ )?}}-DCMAKE_CXX_COMPILER:FILEPATH={{.*}}/FakeCompilers/clang++-r154331
+# RUN: FileCheck  --check-prefix CHECK-CACHE2 < %t.cmake-cache.log %s
+# CHECK-CACHE2: Execute: {{.*}}cmake {{(.+ )?}}-DCMAKE_C_COMPILER:FILEPATH={{.*}}FakeCompilers/clang-r154331
+# RUN: FileCheck  --check-prefix CHECK-CACHE3 < %t.cmake-cache.log %s
+# CHECK-CACHE3: Execute: {{.*}}cmake {{(.+ )?}}-C {{.*}}/Release.cmake
+# RUN: FileCheck  --check-prefix CHECK-CACHE4 < %t.cmake-cache.log %s
+# CHECK-CACHE4: Execute: {{.*}}cmake {{(.+ )?}}-DFOO=BAR
+# RUN: FileCheck  --check-prefix CHECK-CACHE5 < %t.cmake-cache.log %s
+# CHECK-CACHE5: Execute: {{.*}}cmake {{(.+ )?}}-DBAR=BAZ
 
 # RUN: rm -rf %t.SANDBOX
 # Check a run of test-suite using a invalid cmake cache
@@ -29,5 +37,5 @@
 # RUN:     --use-lit %S/Inputs/test-suite-cmake/fake-lit \
 # RUN:     --cmake-cache Debug \
 # RUN:     &> %t.cmake-cache2.err || true
-# RUN: FileCheck  --check-prefix CHECK-CACHE2 < %t.cmake-cache2.err %s
-# CHECK-CACHE2: Could not find CMake cache file
+# RUN: FileCheck  --check-prefix CHECK-CACHE6 < %t.cmake-cache2.err %s
+# CHECK-CACHE6: Could not find CMake cache file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68863.224556.patch
Type: text/x-patch
Size: 1853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191011/99a1b795/attachment.bin>


More information about the llvm-commits mailing list