diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt b/llvm/utils/lit/tests/Inputs/shtest-format-argv0/argv0.txt rename from llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt rename to llvm/utils/lit/tests/Inputs/shtest-format-argv0/argv0.txt diff --git a/llvm/utils/lit/tests/Inputs/shtest-format-argv0/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-format-argv0/lit.cfg new file mode 100644 --- /dev/null +++ b/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' diff --git a/llvm/utils/lit/tests/lit.cfg b/llvm/utils/lit/tests/lit.cfg --- a/llvm/utils/lit/tests/lit.cfg +++ b/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 diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt b/llvm/utils/lit/tests/shtest-format-argv0.py rename from llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt rename to llvm/utils/lit/tests/shtest-format-argv0.py --- a/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt +++ b/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 diff --git a/llvm/utils/lit/tests/shtest-format.py b/llvm/utils/lit/tests/shtest-format.py --- a/llvm/utils/lit/tests/shtest-format.py +++ b/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: # XUNIT-NEXT: -# XUNIT-NEXT: - -# XUNIT: +# XUNIT-NEXT: # XUNIT: # XUNIT-NEXT: