[PATCH] D82100: [AIX] Split lit test shtest-format into two separate tests and add AIX as UNSUPPORTED for shtest-format-argv0

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 14:15:24 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaf8aee7c073b: [AIX] Split lit test shtest-format into two separate tests and add AIX as… (authored by ShuhongL, committed by daltenty).

Changed prior to commit:
  https://reviews.llvm.org/D82100?vs=271831&id=271845#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82100/new/

https://reviews.llvm.org/D82100

Files:
  llvm/utils/lit/tests/Inputs/shtest-format-argv0/argv0.txt
  llvm/utils/lit/tests/Inputs/shtest-format-argv0/lit.cfg
  llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt
  llvm/utils/lit/tests/lit.cfg
  llvm/utils/lit/tests/shtest-format-argv0.py
  llvm/utils/lit/tests/shtest-format.py


Index: llvm/utils/lit/tests/shtest-format.py
===================================================================
--- llvm/utils/lit/tests/shtest-format.py
+++ llvm/utils/lit/tests/shtest-format.py
@@ -9,7 +9,6 @@
 
 # CHECK: -- Testing:
 
-# CHECK: PASS: shtest-format :: argv0.txt
 # CHECK: FAIL: shtest-format :: external_shell/fail.txt
 # CHECK-NEXT: *** TEST 'shtest-format :: external_shell/fail.txt' FAILED ***
 # CHECK: Command Output (stdout):
@@ -79,7 +78,7 @@
 
 # CHECK: Testing Time:
 # CHECK: Unsupported        : 4
-# CHECK: Passed             : 7
+# CHECK: Passed             : 6
 # CHECK: Expectedly Failed  : 4
 # CHECK: Unresolved         : 3
 # CHECK: Failed             : 3
@@ -88,9 +87,7 @@
 
 # XUNIT: <?xml version="1.0" encoding="UTF-8"?>
 # XUNIT-NEXT: <testsuites>
-# XUNIT-NEXT: <testsuite name="shtest-format" tests="22" failures="7" skipped="4">
-
-# XUNIT: <testcase classname="shtest-format.shtest-format" name="argv0.txt" time="{{[0-9]+\.[0-9]+}}"/>
+# XUNIT-NEXT: <testsuite name="shtest-format" tests="21" failures="7" skipped="4">
 
 # XUNIT: <testcase classname="shtest-format.external_shell" name="fail.txt" time="{{[0-9]+\.[0-9]+}}">
 # XUNIT-NEXT: <failure{{[ ]*}}>
Index: llvm/utils/lit/tests/shtest-format-argv0.py
===================================================================
--- llvm/utils/lit/tests/shtest-format-argv0.py
+++ llvm/utils/lit/tests/shtest-format-argv0.py
@@ -3,4 +3,11 @@
 # X only recognizes that it is in '['-mode when its argv[0] is exactly
 # '['. Otherwise it will refuse to accept the trailing closing bracket.
 #
-# RUN: [ "A" = "A" ]
+# This test is not supported on AIX since `[` is only available as a shell builtin
+# and is not installed under PATH by default.
+# UNSUPPORTED: aix
+#
+# RUN: %{lit} -j 1 -v %{inputs}/shtest-format-argv0 | FileCheck %s
+
+# CHECK: -- Testing:
+# CHECK: PASS: shtest-format-argv0 :: argv0.txt
Index: llvm/utils/lit/tests/lit.cfg
===================================================================
--- llvm/utils/lit/tests/lit.cfg
+++ llvm/utils/lit/tests/lit.cfg
@@ -86,6 +86,8 @@
 if not llvm_config:
   if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
     config.available_features.add('system-windows')
+  if platform.system() == 'AIX':
+    config.available_features.add('aix')
 
 # For each of lit's internal shell commands ('env', 'cd', 'diff', etc.), put
 # a fake command that always fails at the start of PATH.  This helps us check
Index: llvm/utils/lit/tests/Inputs/shtest-format-argv0/lit.cfg
===================================================================
--- /dev/null
+++ llvm/utils/lit/tests/Inputs/shtest-format-argv0/lit.cfg
@@ -0,0 +1,7 @@
+import lit.formats
+config.name = 'shtest-format-argv0'
+config.suffixes = ['.txt']
+config.test_format = lit.formats.ShTest()
+config.test_source_root = None
+config.test_exec_root = None
+config.target_triple = 'x86_64-unknown-unknown'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82100.271845.patch
Type: text/x-patch
Size: 2934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200618/88d43928/attachment.bin>


More information about the llvm-commits mailing list