diff options
Diffstat (limited to 'gnu/llvm/utils/lit/tests')
155 files changed, 0 insertions, 2635 deletions
diff --git a/gnu/llvm/utils/lit/tests/.coveragerc b/gnu/llvm/utils/lit/tests/.coveragerc deleted file mode 100644 index c886d0ac1a6..00000000000 --- a/gnu/llvm/utils/lit/tests/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -# .coveragerc to control coverage.py -[run] -branch = False -parallel = True -source = lit - -[html] -directory = coverage_html_report - -[report] -omit = Inputs diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/driver.py b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/driver.py deleted file mode 100644 index db9141b9b1b..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/driver.py +++ /dev/null @@ -1,16 +0,0 @@ -import lit.util -import os -import sys - -main_config = sys.argv[1] -main_config = os.path.realpath(main_config) -main_config = os.path.normcase(main_config) - -config_map = {main_config : sys.argv[2]} -builtin_parameters = {'config_map' : config_map} - -if __name__=='__main__': - from lit.main import main - main_config_dir = os.path.dirname(main_config) - sys.argv = [sys.argv[0]] + sys.argv[3:] + [main_config_dir] - main(builtin_parameters) diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/invalid-test.txt b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/invalid-test.txt deleted file mode 100644 index e69de29bb2d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/invalid-test.txt +++ /dev/null diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg deleted file mode 100644 index c7b303f50a0..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg +++ /dev/null @@ -1,9 +0,0 @@ -import lit.formats -import lit.util -config.name = 'config-map' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() - -import os -config.test_exec_root = os.path.realpath(os.path.dirname(__file__)) -config.test_source_root = os.path.join(config.test_exec_root, "tests") diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/main-config/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/main-config/lit.cfg deleted file mode 100644 index 380a05beb4a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/main-config/lit.cfg +++ /dev/null @@ -1 +0,0 @@ -print("ERROR: lit.cfg invoked!")
\ No newline at end of file diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test1.txt b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test1.txt deleted file mode 100644 index e69de29bb2d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test1.txt +++ /dev/null diff --git a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test2.txt b/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test2.txt deleted file mode 100644 index e69de29bb2d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/config-map-discovery/tests/test2.txt +++ /dev/null diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/discovery/lit.cfg deleted file mode 100644 index c48ca0bc036..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/lit.cfg +++ /dev/null @@ -1,14 +0,0 @@ -import lit.formats -config.name = 'top-level-suite' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() - -# We intentionally don't set the source root or exec root directories here, -# because this suite gets reused for testing the exec root behavior (in -# ../exec-discovery). -# -#config.test_source_root = None -#config.test_exec_root = None - -# Check that arbitrary config values are copied (tested by subdir/lit.local.cfg). -config.an_extra_variable = False diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg b/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg deleted file mode 100644 index 631cb602b0d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg +++ /dev/null @@ -1,4 +0,0 @@ -config.suffixes = ['.py'] - -# Check that the arbitrary config values in our parent was inherited. -assert hasattr(config, 'an_extra_variable') diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/test-three.py b/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/test-three.py deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/subdir/test-three.py +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg deleted file mode 100644 index b49329abfde..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/lit.cfg +++ /dev/null @@ -1,6 +0,0 @@ -import lit.formats -config.name = 'sub-suite' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() -config.test_source_root = None -config.test_exec_root = None diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt b/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-one.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt b/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/subsuite/test-two.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/test-one.txt b/gnu/llvm/utils/lit/tests/Inputs/discovery/test-one.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/test-one.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/discovery/test-two.txt b/gnu/llvm/utils/lit/tests/Inputs/discovery/test-two.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/discovery/test-two.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg deleted file mode 100644 index ae25b4f4acb..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg +++ /dev/null @@ -1,9 +0,0 @@ -import lit.formats - -# Verify that the site configuration was loaded. -if config.test_source_root is None or config.test_exec_root is None: - lit_config.fatal("No site specific configuration") - -config.name = 'exec-discovery-in-tree-suite' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() diff --git a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/test-one.txt b/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/test-one.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery-in-tree/test-one.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg b/gnu/llvm/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg deleted file mode 100644 index ac273c797c5..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/exec-discovery/lit.site.cfg +++ /dev/null @@ -1,5 +0,0 @@ -# Load the discovery suite, but with a separate exec root. -import os -config.test_exec_root = os.path.dirname(__file__) -config.test_source_root = os.path.join(os.path.dirname(config.test_exec_root), "discovery") -lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg")) diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py b/gnu/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py deleted file mode 100644 index dd49f025b1f..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -import sys - -if len(sys.argv) != 2: - raise ValueError("unexpected number of args") - -if sys.argv[1] == "--gtest_list_tests": - print("""\ -FirstTest. - subTestA - subTestB -ParameterizedTest/0. - subTest -ParameterizedTest/1. - subTest""") - sys.exit(0) -elif not sys.argv[1].startswith("--gtest_filter="): - raise ValueError("unexpected argument: %r" % (sys.argv[1])) - -test_name = sys.argv[1].split('=',1)[1] -if test_name == 'FirstTest.subTestA': - print('I am subTest A, I PASS') - print('[ PASSED ] 1 test.') - sys.exit(0) -elif test_name == 'FirstTest.subTestB': - print('I am subTest B, I FAIL') - print('And I have two lines of output') - sys.exit(1) -elif test_name in ('ParameterizedTest/0.subTest', - 'ParameterizedTest/1.subTest'): - print('I am a parameterized test, I also PASS') - print('[ PASSED ] 1 test.') - sys.exit(0) -else: - raise SystemExit("error: invalid test name: %r" % (test_name,)) diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-format/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/googletest-format/lit.cfg deleted file mode 100644 index f2f6cda8db6..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-format/lit.cfg +++ /dev/null @@ -1,3 +0,0 @@ -import lit.formats -config.name = 'googletest-format' -config.test_format = lit.formats.GoogleTest('DummySubDir', 'Test') diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py b/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py deleted file mode 100644 index f3a90ff4cd6..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -import sys -import time - -if len(sys.argv) != 2: - raise ValueError("unexpected number of args") - -if sys.argv[1] == "--gtest_list_tests": - print("""\ -FirstTest. - subTestA - subTestB - subTestC -""") - sys.exit(0) -elif not sys.argv[1].startswith("--gtest_filter="): - raise ValueError("unexpected argument: %r" % (sys.argv[1])) - -test_name = sys.argv[1].split('=',1)[1] -if test_name == 'FirstTest.subTestA': - print('I am subTest A, I PASS') - print('[ PASSED ] 1 test.') - sys.exit(0) -elif test_name == 'FirstTest.subTestB': - print('I am subTest B, I am slow') - time.sleep(6) - print('[ PASSED ] 1 test.') - sys.exit(0) -elif test_name == 'FirstTest.subTestC': - print('I am subTest C, I will hang') - while True: - pass -else: - raise SystemExit("error: invalid test name: %r" % (test_name,)) diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/lit.cfg deleted file mode 100644 index bf8a4db2bf9..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-timeout/lit.cfg +++ /dev/null @@ -1,9 +0,0 @@ -import lit.formats -config.name = 'googletest-timeout' -config.test_format = lit.formats.GoogleTest('DummySubDir', 'Test') - -configSetTimeout = lit_config.params.get('set_timeout', '0') - -if configSetTimeout == '1': - # Try setting the max individual test time in the configuration - lit_config.maxIndividualTestTime = 1 diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py b/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py deleted file mode 100644 index d7bc5968f26..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -import sys - -if len(sys.argv) != 2: - raise ValueError("unexpected number of args") - -if sys.argv[1] == "--gtest_list_tests": - print("""\ -Running main() from gtest_main.cc -FirstTest. - subTestA - subTestB -ParameterizedTest/0. - subTest -ParameterizedTest/1. - subTest""") - sys.exit(0) -elif not sys.argv[1].startswith("--gtest_filter="): - raise ValueError("unexpected argument: %r" % (sys.argv[1])) - -test_name = sys.argv[1].split('=',1)[1] -print('Running main() from gtest_main.cc') -if test_name == 'FirstTest.subTestA': - print('I am subTest A, I PASS') - print('[ PASSED ] 1 test.') - sys.exit(0) -elif test_name == 'FirstTest.subTestB': - print('I am subTest B, I FAIL') - print('And I have two lines of output') - sys.exit(1) -elif test_name in ('ParameterizedTest/0.subTest', - 'ParameterizedTest/1.subTest'): - print('I am a parameterized test, I also PASS') - print('[ PASSED ] 1 test.') - sys.exit(0) -else: - raise SystemExit("error: invalid test name: %r" % (test_name,)) diff --git a/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/lit.cfg deleted file mode 100644 index 9fb5d2b0247..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/googletest-upstream-format/lit.cfg +++ /dev/null @@ -1,3 +0,0 @@ -import lit.formats -config.name = 'googletest-upstream-format' -config.test_format = lit.formats.GoogleTest('DummySubDir', 'Test') diff --git a/gnu/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg deleted file mode 100644 index 605bd723367..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg +++ /dev/null @@ -1,2 +0,0 @@ -lit_config.load_config(config, os.path.dirname(__file__) + "/../shtest-shell/lit.cfg") -config.test_source_root = os.path.dirname(__file__) + '/../shtest-shell' diff --git a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/progress-bar/lit.cfg deleted file mode 100644 index 7f31129ad11..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/lit.cfg +++ /dev/null @@ -1,6 +0,0 @@ -import lit.formats -config.name = 'shtest-shell' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() -config.test_source_root = None -config.test_exec_root = None diff --git a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-1.txt b/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-1.txt deleted file mode 100644 index 49932c3006e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-1.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-2.txt b/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-2.txt deleted file mode 100644 index 49932c3006e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-2.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-3.txt b/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-3.txt deleted file mode 100644 index 49932c3006e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-3.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-4.txt b/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-4.txt deleted file mode 100644 index 49932c3006e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/progress-bar/test-4.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/py-config-discovery/lit.site.cfg.py b/gnu/llvm/utils/lit/tests/Inputs/py-config-discovery/lit.site.cfg.py deleted file mode 100644 index ac273c797c5..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/py-config-discovery/lit.site.cfg.py +++ /dev/null @@ -1,5 +0,0 @@ -# Load the discovery suite, but with a separate exec root. -import os -config.test_exec_root = os.path.dirname(__file__) -config.test_source_root = os.path.join(os.path.dirname(config.test_exec_root), "discovery") -lit_config.load_config(config, os.path.join(config.test_source_root, "lit.cfg")) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env-u.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env-u.txt deleted file mode 100644 index 9cdf9d08850..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env-u.txt +++ /dev/null @@ -1,23 +0,0 @@ -# Check and make sure preset environment variable were set in lit.cfg -# -# RUN: %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-PRESET %s -# -# Check single unset of environment variable -# -# RUN: env -u FOO %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-UNSET-1 %s -# -# Check multiple unsets of environment variables -# -# RUN: env -u FOO -u BAR %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-UNSET-MULTIPLE %s - -# CHECK-ENV-PRESET: BAR = 2 -# CHECK-ENV-PRESET: FOO = 1 - -# CHECK-ENV-UNSET-1: BAR = 2 -# CHECK-ENV-UNSET-1-NOT: FOO - -# CHECK-ENV-UNSET-MULTIPLE-NOT: BAR -# CHECK-ENV-UNSET-MULTIPLE-NOT: FOO diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env.txt deleted file mode 100644 index aa697b0c408..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/env.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Check for simple one environment variable setting -# -# RUN: env A_FOO=999 %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-1 %s -# -# Check for multiple environment variable settings -# -# RUN: env A_FOO=1 B_BAR=2 C_OOF=3 %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-MULTIPLE %s - -# CHECK-ENV-1: A_FOO = 999 - -# CHECK-ENV-MULTIPLE: A_FOO = 1 -# CHECK-ENV-MULTIPLE: B_BAR = 2 -# CHECK-ENV-MULTIPLE: C_OOF = 3 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/lit.cfg deleted file mode 100644 index 1e2d050754a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/lit.cfg +++ /dev/null @@ -1,9 +0,0 @@ -import lit.formats -config.name = 'shtest-env' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() -config.test_source_root = None -config.test_exec_root = None -config.environment['FOO'] = '1' -config.environment['BAR'] = '2' -config.substitutions.append(('%{python}', '"%s"' % (sys.executable))) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/mixed.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/mixed.txt deleted file mode 100644 index be32d458843..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/mixed.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Check for setting and removing one environment variable -# -# RUN: env A_FOO=999 -u FOO %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-1 %s -# -# Check for setting/unsetting multiple environment variables -# -# RUN: env A_FOO=1 -u FOO B_BAR=2 -u BAR C_OOF=3 %{python} print_environment.py \ -# RUN: | FileCheck --check-prefix=CHECK-ENV-MULTIPLE %s - -# CHECK-ENV-1: A_FOO = 999 -# CHECK-ENV-1-NOT: FOO - -# CHECK-ENV-MULTIPLE: A_FOO = 1 -# CHECK-ENV-MULTIPLE-NOT: BAR -# CHECK-ENV-MULTIPLE: B_BAR = 2 -# CHECK-ENV-MULTIPLE: C_OOF = 3 -# CHECK-ENV-MULTIPLE-NOT: FOO diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py deleted file mode 100644 index ac9a80e6d50..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_statement -import os - -sorted_environment = sorted(os.environ.items()) - -for name,value in sorted_environment: - print(name,'=',value) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/shtest-env.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-env/shtest-env.py deleted file mode 100644 index fc5f973e676..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-env/shtest-env.py +++ /dev/null @@ -1,3 +0,0 @@ -# Check the env command -# -# RUN: %{lit} -a -v %{inputs}/shtest-env diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt deleted file mode 100644 index 2ff289014bc..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Check that we route argv[0] as it was written, instead of the resolved -# path. This is important for some tools, in particular '[' which at least on OS -# 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" ] diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt deleted file mode 100644 index 069e37619e7..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Run a command that fails with error on stdout. -# -# RUN: echo "line 1: failed test output on stdout" -# RUN: echo "line 2: failed test output on stdout" -# RUN: cat "does-not-exist" diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt deleted file mode 100644 index 7fbc7087a1a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Run a command that fails with error on stdout. -# -# RUN: %{python} %S/write-bad-encoding.py -# RUN: false - diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg deleted file mode 100644 index 5e87c729919..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -import lit.formats -config.test_format = lit.formats.ShTest(execute_external=True) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py deleted file mode 100644 index a5a2bc9da8a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -import sys - -getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.") -sys.stdout.flush() diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/fail.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/fail.txt deleted file mode 100644 index 8c305eb416b..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/fail.txt +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: printf "line 1: failed test output on stdout\nline 2: failed test output on stdout" -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg deleted file mode 100644 index 38c3da3d3cd..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/lit.cfg +++ /dev/null @@ -1,9 +0,0 @@ -import lit.formats -config.name = 'shtest-format' -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' -config.available_features.add('a-present-feature') -config.substitutions.append(('%{python}', '"%s"' % (sys.executable))) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/no-test-line.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/no-test-line.txt deleted file mode 100644 index f2316bd73ad..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/no-test-line.txt +++ /dev/null @@ -1 +0,0 @@ -# Empty! diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/pass.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/pass.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/pass.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-missing.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-missing.txt deleted file mode 100644 index c977ee90c9e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-missing.txt +++ /dev/null @@ -1,2 +0,0 @@ -RUN: true -REQUIRES-ANY: a-missing-feature, a-missing-feature-2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-present.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-present.txt deleted file mode 100644 index f3be518b258..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-any-present.txt +++ /dev/null @@ -1,2 +0,0 @@ -RUN: true -REQUIRES-ANY: a-missing-feature, a-present-feature diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-missing.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-missing.txt deleted file mode 100644 index d643e57edca..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-missing.txt +++ /dev/null @@ -1,5 +0,0 @@ -# REQUIRES with a false clause. Test should not run. -REQUIRES: true -REQUIRES: a-missing-feature, true -REQUIRES: true -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-present.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-present.txt deleted file mode 100644 index 9fcbdca69be..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-present.txt +++ /dev/null @@ -1,4 +0,0 @@ -# REQUIRES with only true clauses. Test should run. -REQUIRES: a-present-feature, true, !not-true -REQUIRES: true -RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-star.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-star.txt deleted file mode 100644 index 5566d8b15b0..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-star.txt +++ /dev/null @@ -1,3 +0,0 @@ -# '*' only works in XFAIL -REQUIRES: * -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-triple.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-triple.txt deleted file mode 100644 index 6470bf40414..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/requires-triple.txt +++ /dev/null @@ -1,3 +0,0 @@ -# REQUIRES line that uses target triple, which doesn't work. Test should not run -REQUIRES: x86_64 -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt deleted file mode 100644 index 00c6160a367..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt +++ /dev/null @@ -1,9 +0,0 @@ -# UNSUPPORTED with only false clauses. Test should run. -UNSUPPORTED: false -UNSUPPORTED: false, not-true -UNSUPPORTED: false -UNSUPPORTED: still-not-true -UNSUPPORTED: false -UNSUPPORTED: false -UNSUPPORTED: false -RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt deleted file mode 100644 index f48ba7b2c2d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt +++ /dev/null @@ -1,4 +0,0 @@ -# UNSUPPORTED with a true clause. Test should not run. -UNSUPPORTED: false -UNSUPPORTED: false, false, false, _64-unk && a-present-feature, false -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt deleted file mode 100644 index 16630207dac..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt +++ /dev/null @@ -1,3 +0,0 @@ -# '*' only works in XFAIL -UNSUPPORTED: * -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg deleted file mode 100644 index 462e3dc5d11..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.unsupported = True diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt deleted file mode 100644 index 83b0de1621d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt +++ /dev/null @@ -1,3 +0,0 @@ -# XFAIL with only false clauses. Test should run. -XFAIL: false, a-missing-feature || ! a-present-feature || ! x86_64, false -RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt deleted file mode 100644 index 3c197484897..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt +++ /dev/null @@ -1,4 +0,0 @@ -# XFAIL with a true clause. Test should not run. -XFAIL: false -XFAIL: false, a-present-feature && ! a-missing-feature && x86_64 -RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt deleted file mode 100644 index bd6241f8e44..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-feature.txt +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: false -# XFAIL: a-present-feature diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-target.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-target.txt deleted file mode 100644 index 36760bee435..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail-target.txt +++ /dev/null @@ -1,2 +0,0 @@ -RUN: false -XFAIL: x86_64 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail.txt deleted file mode 100644 index 6814cda4014..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xfail.txt +++ /dev/null @@ -1,2 +0,0 @@ -RUN: false -XFAIL: * diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xpass.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xpass.txt deleted file mode 100644 index 764d21798b3..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-format/xpass.txt +++ /dev/null @@ -1,2 +0,0 @@ -RUN: true -XFAIL: x86_64 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt deleted file mode 100644 index 4899c7e63db..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt +++ /dev/null @@ -1,3 +0,0 @@ -# RUN: true -# RUN: echo hi -# RUN: wc missing-file &> %t.out diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/lit.cfg deleted file mode 100644 index 4fe698d7336..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-output-printing/lit.cfg +++ /dev/null @@ -1,4 +0,0 @@ -import lit.formats -config.name = 'shtest-output-printing' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest(execute_external=False) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt deleted file mode 100644 index a359c996660..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt +++ /dev/null @@ -1,6 +0,0 @@ -# These commands must run under both bash and windows cmd.exe (with GnuWin32 -# tools). - -# RUN: true -# RUN: false -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt deleted file mode 100644 index b11f0d759fe..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt +++ /dev/null @@ -1,12 +0,0 @@ -# These commands must run under both bash and windows cmd.exe (with GnuWin32 -# tools). - -# RUN: echo 'foo bar' \ -# RUN: | FileCheck %s -# RUN: echo \ -# RUN: 'foo baz' \ -# RUN: | FileCheck %s -# RUN: echo 'foo bar' \ -# RUN: | FileCheck %s - -# CHECK: foo bar diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg deleted file mode 100644 index 5e87c729919..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -import lit.formats -config.test_format = lit.formats.ShTest(execute_external=True) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/basic.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/basic.txt deleted file mode 100644 index ba2695431bd..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/basic.txt +++ /dev/null @@ -1,3 +0,0 @@ -# RUN: true -# RUN: false -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/line-continuation.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/line-continuation.txt deleted file mode 100644 index 1e00bcb9616..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/line-continuation.txt +++ /dev/null @@ -1,11 +0,0 @@ -# RUN: : first line continued \ -# RUN: to second line -# RUN: echo 'foo bar' \ -# RUN: | FileCheck %s -# RUN: echo \ -# RUN: 'foo baz' \ -# RUN: | FileCheck %s -# RUN: echo 'foo bar' \ -# RUN: | FileCheck %s - -# CHECK: foo bar diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/lit.local.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/lit.local.cfg deleted file mode 100644 index b76b7a24c99..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -import lit.formats -config.test_format = lit.formats.ShTest(execute_external=False) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/lit.cfg deleted file mode 100644 index f4c7921b732..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-run-at-line/lit.cfg +++ /dev/null @@ -1,2 +0,0 @@ -config.name = 'shtest-run-at-line' -config.suffixes = ['.txt'] diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-0.txt deleted file mode 100644 index 690bc1e9e92..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-0.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an unsupported option for cat . -# -# RUN: cat -b temp1.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-1.txt deleted file mode 100644 index 5344707e966..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat-error-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported cat (Unable to find input file). -# -# RUN: cat temp1.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat_nonprinting.bin b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat_nonprinting.bin Binary files differdeleted file mode 100644 index b4af9817b35..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/cat_nonprinting.bin +++ /dev/null diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py deleted file mode 100644 index 2f7a2503b97..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -import argparse -import platform - -parser = argparse.ArgumentParser() -parser.add_argument("--my_arg", "-a") - -args = parser.parse_args() - -answer = (platform.system() == "Windows" and - args.my_arg == "/dev/null" and "ERROR") or "OK" - -print(answer) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py deleted file mode 100644 index 467505b7f29..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -import os -import sys - - -def check_path(argv): - if len(argv) < 3: - print("Wrong number of args") - return 1 - - type = argv[1] - paths = argv[2:] - exit_code = 0 - - if type == 'dir': - for idx, dir in enumerate(paths): - print(os.path.isdir(dir)) - elif type == 'file': - for idx, file in enumerate(paths): - print(os.path.isfile(file)) - else: - print("Unrecognised type {}".format(type)) - exit_code = 1 - return exit_code - -if __name__ == '__main__': - sys.exit (check_path (sys.argv)) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/colon-error.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/colon-error.txt deleted file mode 100644 index 8b84c08ce09..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/colon-error.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an unsupported ":". (cannot be part of a pipeline) -# -# RUN: : | echo "hello" diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/dev-null.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/dev-null.txt deleted file mode 100644 index 1561657085d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/dev-null.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Check handling of /dev/null in command line options -# On windows, it should be redirected to a temp file. -# -# RUN: %{python} %S/check_args.py --my_arg /dev/null | FileCheck %s --check-prefix=CHECK1 -# CHECK1: OK - -# RUN: %{python} %S/check_args.py --my_arg=/dev/null | FileCheck %s --check-prefix=CHECK2 -# CHECK2: OK - -# RUN: %{python} %S/check_args.py -a /dev/null | FileCheck %s --check-prefix=CHECK3 -# CHECK3: OK - -# RUN: %{python} %S/check_args.py -a=/dev/null | FileCheck %s --check-prefix=CHECK4 -# CHECK4: OK diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-0.txt deleted file mode 100644 index 81888cf8197..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-0.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported diff (cannot be part of a pipeline). -# -# RUN: diff diff-error-0.txt diff-error-0.txt | echo Output diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-1.txt deleted file mode 100644 index 9836e0ea9d4..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported diff (not support the -B option). -# -# RUN: diff -B temp1.txt temp2.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-2.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-2.txt deleted file mode 100644 index 9c0da6aa6f6..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-2.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an internal shell error (missing tofile) -# -# RUN: diff temp.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-3.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-3.txt deleted file mode 100644 index 31128193c01..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-3.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an internal shell error (unable to find compared files) -# -# RUN: diff temp.txt temp1.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-4.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-4.txt deleted file mode 100644 index 8569e33e284..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-4.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Check exit code error (file's contents are different) -# -# RUN: echo "hello-first" > %t -# RUN: echo "hello-second" > %t1 -# RUN: diff %t %t1 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-5.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-5.txt deleted file mode 100644 index 6d8d2e5c334..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-5.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an internal shell error (missing operand) -# -# RUN: diff -u diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-6.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-6.txt deleted file mode 100644 index cc13d13c647..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-error-6.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an internal shell error (extra operand) -# -# RUN: diff -u a.txt b.txt c.txt diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-0.txt deleted file mode 100644 index ae571c14f35..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-0.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Add two empty files with different names, "diff -r" should fail. -# RUN: touch %t/dir1/dir1unique -# RUN: touch %t/dir2/dir2unique -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-1.txt deleted file mode 100644 index c68510ddba0..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-1.txt +++ /dev/null @@ -1,9 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Same filenames in subdirs with different content, "diff -r" should fail. -# RUN: mkdir -p %t/dir1/subdir %t/dir2/subdir -# RUN: echo "12345" > %t/dir1/subdir/f01 -# RUN: echo "00000" > %t/dir2/subdir/f01 -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-2.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-2.txt deleted file mode 100644 index 43162614654..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-2.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# An extra file in one of the directories, "diff -r" should fail. -# RUN: echo extra > %t/dir2/extrafile -# RUN: diff -r %t/dir1 %t/dir2
\ No newline at end of file diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-3.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-3.txt deleted file mode 100644 index 62cede34e82..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-3.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# An extra directory in one of the directories, "diff -r" should fail. -# RUN: mkdir -p %t/dir1/extra_subdir -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-4.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-4.txt deleted file mode 100644 index 7abec5e6447..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-4.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Directory vs. File mismatch, "diff -r" should fail. -# RUN: mkdir -p %t/dir1/extra_subdir -# RUN: echo ZYX > %t/dir2/extra_subdir -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-5.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-5.txt deleted file mode 100644 index 4f752d70d8a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-5.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Non-empty extra directory, "diff -r" should fail. -# RUN: mkdir -p %t/dir1/extra_subdir -# RUN: echo ZYX > %t/dir1/extra_subdir/extra_file -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-6.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-6.txt deleted file mode 100644 index 391e3517fca..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-6.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Empty file vs directory mismatch, diff -r should fail. -# RUN: echo -n > %t/dir1/extra_file -# RUN: mkdir -p %t/dir2/extra_file -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r.txt deleted file mode 100644 index c145cab6a49..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Check recursive diff ("diff -r"). - -# Create two directories for further comparison. -# RUN: rm -rf %t/dir1 %t/dir2 -# RUN: mkdir -p %t/dir1 %t/dir2 - -# Create same files in both of the dirs. -# RUN: echo "hello" > %t/dir1/f1 -# RUN: echo "hello" > %t/dir2/f1 - -# Create same subdirectories with same contents. -# RUN: mkdir -p %t/dir1/subdir %t/dir2/subdir -# RUN: echo "12345" > %t/dir1/subdir/f01 -# RUN: echo "12345" > %t/dir2/subdir/f01 -# RUN: echo -e "xxx\nzzz\nyyy" > %t/dir1/subdir/f02 -# RUN: echo -e "xxx\nzzz\nyyy" > %t/dir2/subdir/f02 - -# Create empty subdirectories with same names. -# RUN: mkdir -p %t/dir1/empty_subdir %t/dir2/empty_subdir -# RUN: diff -r %t/dir1 %t/dir2 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-0.txt deleted file mode 100644 index 631c8df233d..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-0.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on an internal shell error (unable to find command). -# -# RUN: not-a-real-command diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-1.txt deleted file mode 100644 index e5c8be6b666..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a shell parsing failure. -# -# RUN: echo "missing quote diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-2.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-2.txt deleted file mode 100644 index a976286bdde..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/error-2.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported redirect. -# -# RUN: echo "hello" 3>&1 diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg deleted file mode 100644 index 3231dedc714..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/lit.cfg +++ /dev/null @@ -1,7 +0,0 @@ -import lit.formats -config.name = 'shtest-shell' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() -config.test_source_root = None -config.test_exec_root = None -config.substitutions.append(('%{python}', '"%s"' % (sys.executable))) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-0.txt deleted file mode 100644 index c29d4211067..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-0.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported mkdir (cannot be part of a pipeline). -# -# RUN: mkdir -p temp | rm -rf temp diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-1.txt deleted file mode 100644 index 8931f3d54eb..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported mkdir (only does not support -m option). -# -# RUN: mkdir -p -m 777 temp diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-2.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-2.txt deleted file mode 100644 index 401dbecf14b..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/mkdir-error-2.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported mkdir (missing operand). -# -# RUN: mkdir -p diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt deleted file mode 100644 index 992ac9eb30a..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/redirects.txt +++ /dev/null @@ -1,41 +0,0 @@ -# Check stdout redirect (> and >>). -# -# RUN: echo "not-present" > %t.stdout-write -# RUN: echo "is-present" > %t.stdout-write -# RUN: FileCheck --check-prefix=STDOUT-WRITE < %t.stdout-write %s -# -# STDOUT-WRITE-NOT: not-present -# STDOUT-WRITE: is-present -# -# RUN: echo "appended-line" >> %t.stdout-write -# RUN: FileCheck --check-prefix=STDOUT-APPEND < %t.stdout-write %s -# -# STDOUT-APPEND: is-present -# STDOUT-APPEND: appended-line - - -# Check stderr redirect (2> and 2>>). -# -# RUN: echo "not-present" > %t.stderr-write -# RUN: %{python} %S/write-to-stderr.py 2> %t.stderr-write -# RUN: FileCheck --check-prefix=STDERR-WRITE < %t.stderr-write %s -# -# STDERR-WRITE-NOT: not-present -# STDERR-WRITE: a line on stderr -# -# RUN: %{python} %S/write-to-stderr.py 2>> %t.stderr-write -# RUN: FileCheck --check-prefix=STDERR-APPEND < %t.stderr-write %s -# -# STDERR-APPEND: a line on stderr -# STDERR-APPEND: a line on stderr - - -# Check combined redirect (&>). -# -# RUN: echo "not-present" > %t.combined -# RUN: %{python} %S/write-to-stdout-and-stderr.py &> %t.combined -# RUN: FileCheck --check-prefix=COMBINED-WRITE < %t.combined %s -# -# COMBINED-WRITE-NOT: not-present -# COMBINED-WRITE: a line on stdout -# COMBINED-WRITE: a line on stderr diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-0.txt deleted file mode 100644 index 52966a813c4..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-0.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported rm. (cannot be part of a pipeline) -# -# RUN: rm -rf temp | echo "hello" diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-1.txt deleted file mode 100644 index 5065ea74420..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-1.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Check error on a unsupported rm (only does not support -v option). -# -# RUN: rm -f -v temp diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-2.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-2.txt deleted file mode 100644 index 71bfe0427b1..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-2.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Check error on a unsupported rm (only supports -f option and in combination with -r). -# -#### RUN: rm -r hello -# RUN: rm hello diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-3.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-3.txt deleted file mode 100644 index 1bab79aad08..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/rm-error-3.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Check error on a unsupported rm (can't remove test since it is a directory). -# -# RUN: mkdir -p test -# RUN: rm -f test diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-0.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-0.txt deleted file mode 100644 index 6578db25afe..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-0.txt +++ /dev/null @@ -1,28 +0,0 @@ -# Check sequencing operations. -# -# RUN: echo "first-line" > %t.out && echo "second-line" >> %t.out -# RUN: FileCheck --check-prefix CHECK-AND < %t.out %s -# -# CHECK-AND: first-line -# CHECK-AND: second-line -# -# The false case of && is tested in sequencing-2.txt - - -# RUN: echo "first-line" > %t.out || echo "second-line" >> %t.out -# RUN: FileCheck --check-prefix CHECK-OR-1 < %t.out %s -# -# CHECK-OR-1: first-line -# CHECK-OR-1-NOT: second-line - -# RUN: false || echo "second-line" > %t.out -# RUN: FileCheck --check-prefix CHECK-OR-2 < %t.out %s -# -# CHECK-OR-2: second-line - - -# RUN: echo "first-line" > %t.out; echo "second-line" >> %t.out -# RUN: FileCheck --check-prefix CHECK-SEQ < %t.out %s -# -# CHECK-SEQ: first-line -# CHECK-SEQ: second-line diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-1.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-1.txt deleted file mode 100644 index 5a1794c26c1..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/sequencing-1.txt +++ /dev/null @@ -1,2 +0,0 @@ -# RUN: false && true -# XFAIL: * diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt deleted file mode 100644 index 7267b9b9ef5..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt +++ /dev/null @@ -1,171 +0,0 @@ -# Check rm file operations. -# Check force remove commands success whether the file does or doesn't exist. -# -# RUN: rm -f %t.write -# RUN: %{python} %S/check_path.py file %t.write > %t.out -# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s -# RUN: echo "create a temp file" > %t.write -# RUN: %{python} %S/check_path.py file %t.write > %t.out -# RUN: FileCheck --check-prefix=FILE-EXIST < %t.out %s -# RUN: rm -f %t.write -# RUN: %{python} %S/check_path.py file %t.write > %t.out -# RUN: FileCheck --check-prefix=REMOVE-FILE < %t.out %s -# -# REMOVE-FILE: False -# FILE-EXIST: True -# -# Check mkdir and rm folder operations. -# Check force remove commands success whether the directory does or doesn't exist. -# -# Check the mkdir command with -p option. -# RUN: rm -f -r %T/test -# RUN: %{python} %S/check_path.py dir %T/test > %t.out -# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s -# RUN: mkdir -p %T/test -# RUN: %{python} %S/check_path.py dir %T/test > %t.out -# RUN: FileCheck --check-prefix=MAKE-PARENT-DIR < %t.out %s -# RUN: rm -f %T/test || true -# RUN: rm -f -r %T/test -# RUN: %{python} %S/check_path.py dir %T/test > %t.out -# RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s -# -# MAKE-PARENT-DIR: True -# REMOVE-PARENT-DIR: False -# -# Check the mkdir command without -p option. -# -# RUN: rm -rf %T/test1 -# RUN: mkdir %T/test1 -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out -# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s -# RUN: cd %T/test1 && mkdir foo -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out -# RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s -# RUN: cd %T && rm -rf %T/test1 -# RUN: %{python} %S/check_path.py dir %T/test1 > %t.out -# RUN: FileCheck --check-prefix=REMOVE-DIR < %t.out %s -# -# MAKE-DIR: True -# REMOVE-DIR: False -# -# Check creating and removing multiple folders and rm * operation. -# -# RUN: rm -rf %T/test -# RUN: mkdir -p %T/test/test1 %T/test/test2 -# RUN: %{python} %S/check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out -# RUN: FileCheck --check-prefix=DIRS-EXIST < %t.out %s -# RUN: mkdir %T/test || true -# RUN: echo "create a temp file" > %T/test/temp.write -# RUN: echo "create a temp1 file" > %T/test/test1/temp1.write -# RUN: echo "create a temp2 file" > %T/test/test2/temp2.write -# RUN: %{python} %S/check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out -# RUN: FileCheck --check-prefix=FILES-EXIST < %t.out %s -# RUN: rm -r -f %T/* -# RUN: %{python} %S/check_path.py dir %T/test > %t.out -# RUN: FileCheck --check-prefix=REMOVE-ALL < %t.out %s -# -# DIRS-EXIST: True -# DIRS-EXIST-NEXT: True -# DIRS-EXIST-NEXT: True -# FILES-EXIST: True -# FILES-EXIST-NEXT: True -# FILES-EXIST-NEXT: True -# REMOVE-ALL: False -# -# Check diff operations. -# -# RUN: echo "hello" > %t.stdout -# RUN: echo "hello" > %t1.stdout -# RUN: diff %t.stdout %t1.stdout -# RUN: diff -u %t.stdout %t1.stdout -# RUN: echo "hello-2" > %t1.stdout -# RUN: diff %t.stdout %t1.stdout || true -# -# RUN: mkdir -p %T/dir1 %T/dir2 -# RUN: cd %T/dir1 && echo "hello" > temp1.txt -# RUN: cd %T/dir2 && echo "hello" > temp2.txt -# RUN: diff temp2.txt ../dir1/temp1.txt -# -# Check cat command with single file. -# -# RUN: rm -rf %T/testCat -# RUN: mkdir -p %T/testCat -# RUN: echo "abcdefgh" > %T/testCat/temp.write -# RUN: cat %T/testCat/temp.write > %T/testCat/tempcat.write -# RUN: %{python} %S/check_path.py file %T/testCat/tempcat.write > %T/testCat/path.out -# RUN: FileCheck --check-prefix=FILE-EXISTS < %T/testCat/path.out %s -# RUN: FileCheck --check-prefix=CAT-OUTPUT < %T/testCat/tempcat.write %s -# FILE-EXISTS: True -# CAT-OUTPUT: abcdefgh -# -# Check cat command with multiple files. -# -# RUN: rm -rf %T/testCat -# RUN: mkdir -p %T/testCat -# RUN: echo "abcdefgh" > %T/testCat/temp1.write -# RUN: echo "efghijkl" > %T/testCat/temp2.write -# RUN: echo "mnopqrst" > %T/testCat/temp3.write -# RUN: cat %T/testCat/temp1.write %T/testCat/temp2.write %T/testCat/temp3.write > %T/testCat/tempmulticat.write -# RUN: %{python} %S/check_path.py file %T/testCat/tempmulticat.write > %T/testCat/path.out -# RUN: FileCheck --check-prefix=MULTI-FILE-EXISTS < %T/testCat/path.out %s -# RUN: FileCheck --check-prefix=MULTI-CAT-OUTPUT < %T/testCat/tempmulticat.write %s -# MULTI-FILE-EXISTS: True -# MULTI-CAT-OUTPUT: abcdefgh -# MULTI-CAT-OUTPUT-NEXT: efghijkl -# MULTI-CAT-OUTPUT-NEXT: mnopqrst -# -# Check cat command with multiple files and piped output to FileCheck. -# -# RUN: rm -rf %T/testCat -# RUN: mkdir -p %T/testCat -# RUN: echo "abcdefgh" > %T/testCat/temp1.write -# RUN: echo "efghijkl" > %T/testCat/temp2.write -# RUN: cat %T/testCat/temp1.write %T/testCat/temp2.write | FileCheck --check-prefix=PIPED-CAT-OUTPUT %s -# PIPED-CAT-OUTPUT: abcdefgh -# PIPED-CAT-OUTPUT-NEXT: efghijkl -# -# Check cat command with multiple files and glob expressions. -# -# RUN: rm -rf %T/testCat -# RUN: mkdir -p %T/testCat -# RUN: echo "cvbnm" > %T/testCat/temp1.write -# RUN: echo "qwerty" > %T/testCat/temp2.write -# RUN: cat %T/testCat/*.write | FileCheck --check-prefix=GLOB-CAT-OUTPUT %s -# GLOB-CAT-OUTPUT: cvbnm -# GLOB-CAT-OUTPUT-NEXT: qwerty -# -# Check cat command with -v option -# -# RUN: cat -v %S/cat_nonprinting.bin | FileCheck --check-prefix=NP-CAT-OUTPUT %s -# NP-CAT-OUTPUT: ^@^A^B^C^D^E^F^G ^H -# NP-CAT-OUTPUT-NEXT: ^K^L^M^N^O^P^Q^R^S -# NP-CAT-OUTPUT-NEXT: ^T^U^V^W^X^Y^Z^[^\^]^^^_ !"#$%&' -# NP-CAT-OUTPUT-NEXT: ()*+,-./0123456789:; -# NP-CAT-OUTPUT-NEXT: <=>?@ABCDEFGHIJKLMNO -# NP-CAT-OUTPUT-NEXT: PQRSTUVWXYZ[\]^_`abc -# NP-CAT-OUTPUT-NEXT: defghijklmnopqrstuvw -# NP-CAT-OUTPUT-NEXT: xyz{|}~^?M-^@M-^AM-^BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^K -# NP-CAT-OUTPUT-NEXT: M-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^VM-^WM-^XM-^YM-^ZM-^[M-^\M-^]M-^^M-^_ -# NP-CAT-OUTPUT-NEXT: M- M-!M-"M-#M-$M-%M-&M-'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3 -# NP-CAT-OUTPUT-NEXT: M-4M-5M-6M-7M-8M-9M-:M-;M-<M-=M->M-?M-@M-AM-BM-CM-DM-EM-FM-G -# NP-CAT-OUTPUT-NEXT: M-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-UM-VM-WM-XM-YM-ZM-[ -# NP-CAT-OUTPUT-NEXT: M-\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-o -# NP-CAT-OUTPUT-NEXT: M-pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^? -# -# Check cat command with -show-nonprinting option -# -# RUN: cat --show-nonprinting %S/cat_nonprinting.bin | FileCheck --check-prefix=NPLONG-CAT-OUTPUT %s -# NPLONG-CAT-OUTPUT: ^@^A^B^C^D^E^F^G ^H -# NPLONG-CAT-OUTPUT-NEXT: ^K^L^M^N^O^P^Q^R^S -# NPLONG-CAT-OUTPUT-NEXT: ^T^U^V^W^X^Y^Z^[^\^]^^^_ !"#$%&' -# NPLONG-CAT-OUTPUT-NEXT: ()*+,-./0123456789:; -# NPLONG-CAT-OUTPUT-NEXT: <=>?@ABCDEFGHIJKLMNO -# NPLONG-CAT-OUTPUT-NEXT: PQRSTUVWXYZ[\]^_`abc -# NPLONG-CAT-OUTPUT-NEXT: defghijklmnopqrstuvw -# NPLONG-CAT-OUTPUT-NEXT: xyz{|}~^?M-^@M-^AM-^BM-^CM-^DM-^EM-^FM-^GM-^HM-^IM-^JM-^K -# NPLONG-CAT-OUTPUT-NEXT: M-^LM-^MM-^NM-^OM-^PM-^QM-^RM-^SM-^TM-^UM-^VM-^WM-^XM-^YM-^ZM-^[M-^\M-^]M-^^M-^_ -# NPLONG-CAT-OUTPUT-NEXT: M- M-!M-"M-#M-$M-%M-&M-'M-(M-)M-*M-+M-,M--M-.M-/M-0M-1M-2M-3 -# NPLONG-CAT-OUTPUT-NEXT: M-4M-5M-6M-7M-8M-9M-:M-;M-<M-=M->M-?M-@M-AM-BM-CM-DM-EM-FM-G -# NPLONG-CAT-OUTPUT-NEXT: M-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-UM-VM-WM-XM-YM-ZM-[ -# NPLONG-CAT-OUTPUT-NEXT: M-\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-o -# NPLONG-CAT-OUTPUT-NEXT: M-pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^? diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py deleted file mode 100644 index 9463251d823..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python - -import sys - - -sys.stderr.write("a line on stderr\n") -sys.stderr.flush() diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py deleted file mode 100644 index 357089d4899..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python - -import sys - - -sys.stdout.write("a line on stdout\n") -sys.stdout.flush() - -sys.stderr.write("a line on stderr\n") -sys.stderr.flush() diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py deleted file mode 100644 index c8ced24f29c..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py +++ /dev/null @@ -1,9 +0,0 @@ -# RUN: %{python} %s -from __future__ import print_function - -import sys - -print("Running infinite loop") -sys.stdout.flush() # Make sure the print gets flushed so it appears in lit output. -while True: - pass diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg deleted file mode 100644 index 6256f5a9911..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg +++ /dev/null @@ -1,40 +0,0 @@ -# -*- Python -*- -import os -import sys - -import lit.formats - -config.name = 'per_test_timeout' - -shellType = lit_config.params.get('external', '1') - -if shellType == '0': - lit_config.note('Using internal shell') - externalShell = False -else: - lit_config.note('Using external shell') - externalShell = True - -configSetTimeout = lit_config.params.get('set_timeout', '0') - -if configSetTimeout != '0': - # Try setting the max individual test time in the configuration - lit_config.maxIndividualTestTime = int(configSetTimeout) - -config.test_format = lit.formats.ShTest(execute_external=externalShell) -config.suffixes = ['.py'] - -config.test_source_root = os.path.dirname(__file__) -config.test_exec_root = config.test_source_root -config.target_triple = '(unused)' -src_root = os.path.join(config.test_source_root, '..') - -pythonpath_list = [src_root] -# Ensure the user's PYTHONPATH is included. -if 'PYTHONPATH' in os.environ: - pythonpath_list.append(os.environ['PYTHONPATH']) -if 'PYTHONPATH' in config.environment: - pythonpath_list.append(config.environment['PYTHONPATH']) -config.environment['PYTHONPATH'] = os.pathsep.join(pythonpath_list) - -config.substitutions.append(('%{python}', '"%s"' % (sys.executable))) diff --git a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/short.py b/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/short.py deleted file mode 100644 index 8963db59f51..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/shtest-timeout/short.py +++ /dev/null @@ -1,4 +0,0 @@ -# RUN: %{python} %s -from __future__ import print_function - -print("short program") diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py b/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py deleted file mode 100644 index 5842f5a5ba3..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/dummy_format.py +++ /dev/null @@ -1,52 +0,0 @@ -import os -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser - -import lit.formats -import lit.Test - -class DummyFormat(lit.formats.FileBasedTest): - def execute(self, test, lit_config): - # In this dummy format, expect that each test file is actually just a - # .ini format dump of the results to report. - - source_path = test.getSourcePath() - - cfg = ConfigParser.ConfigParser() - cfg.read(source_path) - - # Create the basic test result. - result_code = cfg.get('global', 'result_code') - result_output = cfg.get('global', 'result_output') - result = lit.Test.Result(getattr(lit.Test, result_code), - result_output) - - # Load additional metrics. - for key,value_str in cfg.items('results'): - value = eval(value_str) - if isinstance(value, int): - metric = lit.Test.IntMetricValue(value) - elif isinstance(value, float): - metric = lit.Test.RealMetricValue(value) - else: - raise RuntimeError("unsupported result type") - result.addMetric(key, metric) - - # Create micro test results - for key,micro_name in cfg.items('micro-tests'): - micro_result = lit.Test.Result(getattr(lit.Test, result_code, '')) - # Load micro test additional metrics - for key,value_str in cfg.items('micro-results'): - value = eval(value_str) - if isinstance(value, int): - metric = lit.Test.IntMetricValue(value) - elif isinstance(value, float): - metric = lit.Test.RealMetricValue(value) - else: - raise RuntimeError("unsupported result type") - micro_result.addMetric(key, metric) - result.addMicroResult(micro_name, micro_result) - - return result diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/lit.cfg deleted file mode 100644 index 3fc1e859736..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/lit.cfg +++ /dev/null @@ -1,10 +0,0 @@ -import site -site.addsitedir(os.path.dirname(__file__)) -import dummy_format - -config.name = 'test-data-micro' -config.suffixes = ['.ini'] -config.test_format = dummy_format.DummyFormat() -config.test_source_root = None -config.test_exec_root = None -config.target_triple = None diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/micro-tests.ini b/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/micro-tests.ini deleted file mode 100644 index 1e5d76ac7ae..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data-micro/micro-tests.ini +++ /dev/null @@ -1,16 +0,0 @@ -[global] -result_code = PASS -result_output = Test passed. - -[results] -value0 = 1 -value1 = 2.3456 - -[micro-tests] -microtest0 = test0 -microtest1 = test1 -microtest2 = test2 - -[micro-results] -micro_value0 = 4 -micro_value1 = 1.3 diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py b/gnu/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py deleted file mode 100644 index 93e48eeb839..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data/dummy_format.py +++ /dev/null @@ -1,38 +0,0 @@ -import os -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser - -import lit.formats -import lit.Test - -class DummyFormat(lit.formats.FileBasedTest): - def execute(self, test, lit_config): - # In this dummy format, expect that each test file is actually just a - # .ini format dump of the results to report. - - source_path = test.getSourcePath() - - cfg = ConfigParser.ConfigParser() - cfg.read(source_path) - - # Create the basic test result. - result_code = cfg.get('global', 'result_code') - result_output = cfg.get('global', 'result_output') - result = lit.Test.Result(getattr(lit.Test, result_code), - result_output) - - # Load additional metrics. - for key,value_str in cfg.items('results'): - value = eval(value_str) - if isinstance(value, int): - metric = lit.Test.IntMetricValue(value) - elif isinstance(value, float): - metric = lit.Test.RealMetricValue(value) - else: - raise RuntimeError("unsupported result type") - result.addMetric(key, metric) - - return result - diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/test-data/lit.cfg deleted file mode 100644 index 0191cc21888..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data/lit.cfg +++ /dev/null @@ -1,10 +0,0 @@ -import site -site.addsitedir(os.path.dirname(__file__)) -import dummy_format - -config.name = 'test-data' -config.suffixes = ['.ini'] -config.test_format = dummy_format.DummyFormat() -config.test_source_root = None -config.test_exec_root = None -config.target_triple = None diff --git a/gnu/llvm/utils/lit/tests/Inputs/test-data/metrics.ini b/gnu/llvm/utils/lit/tests/Inputs/test-data/metrics.ini deleted file mode 100644 index 01b09c5c775..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/test-data/metrics.ini +++ /dev/null @@ -1,7 +0,0 @@ -[global] -result_code = PASS -result_output = Test passed. - -[results] -value0 = 1 -value1 = 2.3456
\ No newline at end of file diff --git a/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/lit.cfg deleted file mode 100644 index cf46c1674e5..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/lit.cfg +++ /dev/null @@ -1,14 +0,0 @@ -import lit.formats -import os -import lit.Test - -class TestParserFormat(lit.formats.FileBasedTest): - def execute(self, test, lit_config): - return lit.Test.PASS, '' - -config.name = 'custom-parsers' -config.suffixes = ['.txt'] -config.test_format = TestParserFormat() -config.test_source_root = None -config.test_exec_root = None -config.target_triple = 'x86_64-unknown-unknown' diff --git a/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt b/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt deleted file mode 100644 index ed118f382fe..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/testrunner-custom-parsers/test.txt +++ /dev/null @@ -1,13 +0,0 @@ - -// MY_TAG. -// foo bar baz -// MY_RUN: baz -// MY_LIST: one, two -// MY_LIST: three, four -// MY_RUN: foo \ -// MY_RUN: bar -// -// MY_CUSTOM: a b c -// -// END. -// MY_LIST: five diff --git a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg deleted file mode 100644 index 9e08a8629a4..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg +++ /dev/null @@ -1,6 +0,0 @@ -import lit.formats -config.name = 'unittest-adaptor' -config.suffixes = ['.txt'] -config.test_format = lit.formats.ShTest() -config.test_source_root = None -config.test_exec_root = None diff --git a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-one.txt b/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-one.txt deleted file mode 100644 index b80b60b7a27..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-one.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: true diff --git a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-two.txt b/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-two.txt deleted file mode 100644 index 49932c3006e..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/unittest-adaptor/test-two.txt +++ /dev/null @@ -1 +0,0 @@ -# RUN: false diff --git a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini b/gnu/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini deleted file mode 100644 index 3234da66aa4..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/bad&name.ini +++ /dev/null @@ -1,7 +0,0 @@ -[global] -result_code = FAIL -result_output = & < > ]]> &" - -[results] -value0 = 1 -value1 = 2.3456 diff --git a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py b/gnu/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py deleted file mode 100644 index 93e48eeb839..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/dummy_format.py +++ /dev/null @@ -1,38 +0,0 @@ -import os -try: - import ConfigParser -except ImportError: - import configparser as ConfigParser - -import lit.formats -import lit.Test - -class DummyFormat(lit.formats.FileBasedTest): - def execute(self, test, lit_config): - # In this dummy format, expect that each test file is actually just a - # .ini format dump of the results to report. - - source_path = test.getSourcePath() - - cfg = ConfigParser.ConfigParser() - cfg.read(source_path) - - # Create the basic test result. - result_code = cfg.get('global', 'result_code') - result_output = cfg.get('global', 'result_output') - result = lit.Test.Result(getattr(lit.Test, result_code), - result_output) - - # Load additional metrics. - for key,value_str in cfg.items('results'): - value = eval(value_str) - if isinstance(value, int): - metric = lit.Test.IntMetricValue(value) - elif isinstance(value, float): - metric = lit.Test.RealMetricValue(value) - else: - raise RuntimeError("unsupported result type") - result.addMetric(key, metric) - - return result - diff --git a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/lit.cfg b/gnu/llvm/utils/lit/tests/Inputs/xunit-output/lit.cfg deleted file mode 100644 index 0191cc21888..00000000000 --- a/gnu/llvm/utils/lit/tests/Inputs/xunit-output/lit.cfg +++ /dev/null @@ -1,10 +0,0 @@ -import site -site.addsitedir(os.path.dirname(__file__)) -import dummy_format - -config.name = 'test-data' -config.suffixes = ['.ini'] -config.test_format = dummy_format.DummyFormat() -config.test_source_root = None -config.test_exec_root = None -config.target_triple = None diff --git a/gnu/llvm/utils/lit/tests/boolean-parsing.py b/gnu/llvm/utils/lit/tests/boolean-parsing.py deleted file mode 100644 index 372a94d2332..00000000000 --- a/gnu/llvm/utils/lit/tests/boolean-parsing.py +++ /dev/null @@ -1,4 +0,0 @@ -# Test the boolean expression parser -# used for REQUIRES and UNSUPPORTED and XFAIL - -# RUN: %{python} -m lit.BooleanExpression diff --git a/gnu/llvm/utils/lit/tests/discovery.py b/gnu/llvm/utils/lit/tests/discovery.py deleted file mode 100644 index dbabeb39f19..00000000000 --- a/gnu/llvm/utils/lit/tests/discovery.py +++ /dev/null @@ -1,154 +0,0 @@ -# Check the basic discovery process, including a sub-suite. -# -# RUN: %{lit} %{inputs}/discovery \ -# RUN: -j 1 --debug --show-tests --show-suites \ -# RUN: -v > %t.out 2> %t.err -# RUN: FileCheck --check-prefix=CHECK-BASIC-OUT < %t.out %s -# RUN: FileCheck --check-prefix=CHECK-BASIC-ERR < %t.err %s -# -# CHECK-BASIC-ERR: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}' -# CHECK-BASIC-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}' -# CHECK-BASIC-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}' -# -# CHECK-BASIC-OUT: -- Test Suites -- -# CHECK-BASIC-OUT: sub-suite - 2 tests -# CHECK-BASIC-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-BASIC-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-BASIC-OUT: top-level-suite - 3 tests -# CHECK-BASIC-OUT: Source Root: {{.*[/\\]discovery$}} -# CHECK-BASIC-OUT: Exec Root : {{.*[/\\]discovery$}} -# -# CHECK-BASIC-OUT: -- Available Tests -- -# CHECK-BASIC-OUT: sub-suite :: test-one -# CHECK-BASIC-OUT: sub-suite :: test-two -# CHECK-BASIC-OUT: top-level-suite :: subdir/test-three -# CHECK-BASIC-OUT: top-level-suite :: test-one -# CHECK-BASIC-OUT: top-level-suite :: test-two - -# Check discovery when providing the special builtin 'config_map' -# RUN: %{python} %{inputs}/config-map-discovery/driver.py \ -# RUN: %{inputs}/config-map-discovery/main-config/lit.cfg \ -# RUN: %{inputs}/config-map-discovery/lit.alt.cfg \ -# RUN: --single-process --debug --show-tests --show-suites > %t.out 2> %t.err -# RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-OUT < %t.out %s -# RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-ERR < %t.err %s - -# CHECK-CONFIG-MAP-OUT-NOT: ERROR: lit.cfg invoked -# CHECK-CONFIG-MAP-OUT: -- Test Suites -- -# CHECK-CONFIG-MAP-OUT: config-map - 2 tests -# CHECK-CONFIG-MAP-OUT: Source Root: {{.*[/\\]config-map-discovery[/\\]tests}} -# CHECK-CONFIG-MAP-OUT: Exec Root : {{.*[/\\]tests[/\\]Inputs[/\\]config-map-discovery}} -# CHECK-CONFIG-MAP-OUT: -- Available Tests -- -# CHECK-CONFIG-MAP-OUT-NOT: invalid-test.txt -# CHECK-CONFIG-MAP-OUT: config-map :: test1.txt -# CHECK-CONFIG-MAP-OUT: config-map :: test2.txt - -# CHECK-CONFIG-MAP-ERR: loading suite config '{{.*}}lit.alt.cfg' -# CHECK-CONFIG-MAP-ERR: loaded config '{{.*}}lit.alt.cfg' -# CHECK-CONFIG-MAP-ERR: resolved input '{{.*(/|\\\\)config-map-discovery(/|\\\\)main-config}}' to 'config-map'::() - - -# Check discovery when exact test names are given. -# -# RUN: %{lit} \ -# RUN: %{inputs}/discovery/subdir/test-three.py \ -# RUN: %{inputs}/discovery/subsuite/test-one.txt \ -# RUN: -j 1 --show-tests --show-suites -v > %t.out -# RUN: FileCheck --check-prefix=CHECK-EXACT-TEST < %t.out %s -# -# CHECK-EXACT-TEST: -- Available Tests -- -# CHECK-EXACT-TEST: sub-suite :: test-one -# CHECK-EXACT-TEST: top-level-suite :: subdir/test-three - -# Check discovery when config files end in .py -# RUN: %{lit} %{inputs}/py-config-discovery \ -# RUN: -j 1 --debug --show-tests --show-suites \ -# RUN: -v > %t.out 2> %t.err -# RUN: FileCheck --check-prefix=CHECK-PYCONFIG-OUT < %t.out %s -# RUN: FileCheck --check-prefix=CHECK-PYCONFIG-ERR < %t.err %s -# -# CHECK-PYCONFIG-ERR: loading suite config '{{.*(/|\\\\)py-config-discovery(/|\\\\)lit.site.cfg.py}}' -# CHECK-PYCONFIG-ERR: load_config from '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}' -# CHECK-PYCONFIG-ERR: loaded config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}' -# CHECK-PYCONFIG-ERR: loaded config '{{.*(/|\\\\)py-config-discovery(/|\\\\)lit.site.cfg.py}}' -# CHECK-PYCONFIG-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}' -# CHECK-PYCONFIG-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}' -# -# CHECK-PYCONFIG-OUT: -- Test Suites -- -# CHECK-PYCONFIG-OUT: sub-suite - 2 tests -# CHECK-PYCONFIG-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-PYCONFIG-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-PYCONFIG-OUT: top-level-suite - 3 tests -# CHECK-PYCONFIG-OUT: Source Root: {{.*[/\\]discovery$}} -# CHECK-PYCONFIG-OUT: Exec Root : {{.*[/\\]py-config-discovery$}} -# -# CHECK-PYCONFIG-OUT: -- Available Tests -- -# CHECK-PYCONFIG-OUT: sub-suite :: test-one -# CHECK-PYCONFIG-OUT: sub-suite :: test-two -# CHECK-PYCONFIG-OUT: top-level-suite :: subdir/test-three -# CHECK-PYCONFIG-OUT: top-level-suite :: test-one -# CHECK-PYCONFIG-OUT: top-level-suite :: test-two - -# Check discovery when using an exec path. -# -# RUN: %{lit} %{inputs}/exec-discovery \ -# RUN: -j 1 --debug --show-tests --show-suites \ -# RUN: -v > %t.out 2> %t.err -# RUN: FileCheck --check-prefix=CHECK-ASEXEC-OUT < %t.out %s -# RUN: FileCheck --check-prefix=CHECK-ASEXEC-ERR < %t.err %s -# -# CHECK-ASEXEC-ERR: loading suite config '{{.*(/|\\\\)exec-discovery(/|\\\\)lit.site.cfg}}' -# CHECK-ASEXEC-ERR: load_config from '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}' -# CHECK-ASEXEC-ERR: loaded config '{{.*(/|\\\\)discovery(/|\\\\)lit.cfg}}' -# CHECK-ASEXEC-ERR: loaded config '{{.*(/|\\\\)exec-discovery(/|\\\\)lit.site.cfg}}' -# CHECK-ASEXEC-ERR-DAG: loading suite config '{{.*(/|\\\\)discovery(/|\\\\)subsuite(/|\\\\)lit.cfg}}' -# CHECK-ASEXEC-ERR-DAG: loading local config '{{.*(/|\\\\)discovery(/|\\\\)subdir(/|\\\\)lit.local.cfg}}' -# -# CHECK-ASEXEC-OUT: -- Test Suites -- -# CHECK-ASEXEC-OUT: sub-suite - 2 tests -# CHECK-ASEXEC-OUT: Source Root: {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-ASEXEC-OUT: Exec Root : {{.*[/\\]discovery[/\\]subsuite$}} -# CHECK-ASEXEC-OUT: top-level-suite - 3 tests -# CHECK-ASEXEC-OUT: Source Root: {{.*[/\\]discovery$}} -# CHECK-ASEXEC-OUT: Exec Root : {{.*[/\\]exec-discovery$}} -# -# CHECK-ASEXEC-OUT: -- Available Tests -- -# CHECK-ASEXEC-OUT: sub-suite :: test-one -# CHECK-ASEXEC-OUT: sub-suite :: test-two -# CHECK-ASEXEC-OUT: top-level-suite :: subdir/test-three -# CHECK-ASEXEC-OUT: top-level-suite :: test-one -# CHECK-ASEXEC-OUT: top-level-suite :: test-two - -# Check discovery when exact test names are given. -# -# FIXME: Note that using a path into a subsuite doesn't work correctly here. -# -# RUN: %{lit} \ -# RUN: %{inputs}/exec-discovery/subdir/test-three.py \ -# RUN: -j 1 --show-tests --show-suites -v > %t.out -# RUN: FileCheck --check-prefix=CHECK-ASEXEC-EXACT-TEST < %t.out %s -# -# CHECK-ASEXEC-EXACT-TEST: -- Available Tests -- -# CHECK-ASEXEC-EXACT-TEST: top-level-suite :: subdir/test-three - - -# Check that we don't recurse infinitely when loading an site specific test -# suite located inside the test source root. -# -# RUN: %{lit} \ -# RUN: %{inputs}/exec-discovery-in-tree/obj/ \ -# RUN: -j 1 --show-tests --show-suites -v > %t.out -# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s -# -# Try it again after cd'ing into the test suite using a short relative path. -# -# RUN: cd %{inputs}/exec-discovery-in-tree/obj/ -# RUN: %{lit} . \ -# RUN: -j 1 --show-tests --show-suites -v > %t.out -# RUN: FileCheck --check-prefix=CHECK-ASEXEC-INTREE < %t.out %s -# -# CHECK-ASEXEC-INTREE: exec-discovery-in-tree-suite - 1 tests -# CHECK-ASEXEC-INTREE-NEXT: Source Root: {{.*[/\\]exec-discovery-in-tree$}} -# CHECK-ASEXEC-INTREE-NEXT: Exec Root : {{.*[/\\]exec-discovery-in-tree[/\\]obj$}} -# CHECK-ASEXEC-INTREE-NEXT: -- Available Tests -- -# CHECK-ASEXEC-INTREE-NEXT: exec-discovery-in-tree-suite :: test-one diff --git a/gnu/llvm/utils/lit/tests/googletest-format.py b/gnu/llvm/utils/lit/tests/googletest-format.py deleted file mode 100644 index 094c6cfc514..00000000000 --- a/gnu/llvm/utils/lit/tests/googletest-format.py +++ /dev/null @@ -1,23 +0,0 @@ -# Check the various features of the GoogleTest format. -# -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-format > %t.out -# FIXME: Temporarily dump test output so we can debug failing tests on -# buildbots. -# RUN: cat %t.out -# RUN: FileCheck < %t.out %s -# -# END. - -# CHECK: -- Testing: -# CHECK: PASS: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA -# CHECK: FAIL: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB -# CHECK-NEXT: *** TEST 'googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB' FAILED *** -# CHECK-NEXT: I am subTest B, I FAIL -# CHECK-NEXT: And I have two lines of output -# CHECK: *** -# CHECK: PASS: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/ParameterizedTest/0.subTest -# CHECK: PASS: googletest-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/ParameterizedTest/1.subTest -# CHECK: Failing Tests (1) -# CHECK: Expected Passes : 3 -# CHECK: Unexpected Failures: 1 - diff --git a/gnu/llvm/utils/lit/tests/googletest-timeout.py b/gnu/llvm/utils/lit/tests/googletest-timeout.py deleted file mode 100644 index 8b7d10fc1f0..00000000000 --- a/gnu/llvm/utils/lit/tests/googletest-timeout.py +++ /dev/null @@ -1,29 +0,0 @@ -# REQUIRES: python-psutil - -# Check that the per test timeout is enforced when running GTest tests. -# -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout --timeout=1 > %t.cmd.out -# RUN: FileCheck < %t.cmd.out %s - -# Check that the per test timeout is enforced when running GTest tests via -# the configuration file -# -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \ -# RUN: --param set_timeout=1 > %t.cfgset.out 2> %t.cfgset.err -# RUN: FileCheck < %t.cfgset.out %s - -# CHECK: -- Testing: -# CHECK: PASS: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA -# CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB -# CHECK: TIMEOUT: googletest-timeout :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestC -# CHECK: Expected Passes : 1 -# CHECK: Individual Timeouts: 2 - -# Test per test timeout via a config file and on the command line. -# The value set on the command line should override the config file. -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-timeout \ -# RUN: --param set_timeout=1 --timeout=2 > %t.cmdover.out 2> %t.cmdover.err -# RUN: FileCheck < %t.cmdover.out %s -# RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s - -# CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds diff --git a/gnu/llvm/utils/lit/tests/googletest-upstream-format.py b/gnu/llvm/utils/lit/tests/googletest-upstream-format.py deleted file mode 100644 index 938740d80e7..00000000000 --- a/gnu/llvm/utils/lit/tests/googletest-upstream-format.py +++ /dev/null @@ -1,20 +0,0 @@ -# Check the various features of the GoogleTest format. -# -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-upstream-format > %t.out -# RUN: FileCheck < %t.out %s -# -# END. - -# CHECK: -- Testing: -# CHECK: PASS: googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestA -# CHECK: FAIL: googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB -# CHECK-NEXT: *** TEST 'googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/FirstTest.subTestB' FAILED *** -# CHECK-NEXT: Running main() from gtest_main.cc -# CHECK-NEXT: I am subTest B, I FAIL -# CHECK-NEXT: And I have two lines of output -# CHECK: *** -# CHECK: PASS: googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/ParameterizedTest/0.subTest -# CHECK: PASS: googletest-upstream-format :: {{[Dd]ummy[Ss]ub[Dd]ir}}/OneTest.py/ParameterizedTest/1.subTest -# CHECK: Failing Tests (1) -# CHECK: Expected Passes : 3 -# CHECK: Unexpected Failures: 1 diff --git a/gnu/llvm/utils/lit/tests/lit.cfg b/gnu/llvm/utils/lit/tests/lit.cfg deleted file mode 100644 index 2af93d6314a..00000000000 --- a/gnu/llvm/utils/lit/tests/lit.cfg +++ /dev/null @@ -1,82 +0,0 @@ -# -*- Python -*- - -import os -import sys - -import lit.formats - -# Configuration file for the 'lit' test runner. - -# name: The name of this test suite. -config.name = 'lit' - -# testFormat: The test format to use to interpret tests. -config.test_format = lit.formats.ShTest(execute_external=False) - -# suffixes: A list of file extensions to treat as test files. -config.suffixes = ['.py'] - -# excludes: A list of individual files to exclude. -config.excludes = ['Inputs'] - -# test_source_root: The root path where tests are located. -config.test_source_root = os.path.dirname(__file__) -config.test_exec_root = config.test_source_root - -config.target_triple = '(unused)' - -src_root = os.path.join(config.test_source_root, '..') -llvm_src_root = getattr(config, 'llvm_src_root', None) -if llvm_src_root != None: - # ``src_root`` may be in LLVM's binary build directory which does not contain - # ``lit.py``, so use `llvm_src_root` instead. - lit_path = os.path.join(llvm_src_root, 'utils', 'lit') -else: - lit_path = src_root - -pythonpath_list = [lit_path] # Required because some tests import the lit module - -# Ensure the user's PYTHONPATH is included. -if 'PYTHONPATH' in os.environ: - pythonpath_list.append(os.environ['PYTHONPATH']) -if 'PYTHONPATH' in config.environment: - pythonpath_list.append(config.environment['PYTHONPATH']) -config.environment['PYTHONPATH'] = os.pathsep.join(pythonpath_list) - -config.substitutions.append(('%{src_root}', src_root)) -config.substitutions.append(('%{inputs}', os.path.join( - src_root, 'tests', 'Inputs'))) -config.substitutions.append(('%{lit}', "%%{python} %s" % ( - os.path.join(lit_path, 'lit.py'),))) -config.substitutions.append(('%{python}', '"%s"' % (sys.executable))) - - -# Enable coverage.py reporting, assuming the coverage module has been installed -# and sitecustomize.py in the virtualenv has been modified appropriately. -if lit_config.params.get('check-coverage', None): - config.environment['COVERAGE_PROCESS_START'] = os.path.join( - os.path.dirname(__file__), ".coveragerc") - -# Add a feature to detect the Python version. -config.available_features.add("python%d.%d" % (sys.version_info[0], - sys.version_info[1])) - -# Add a feature to detect if psutil is available -try: - import psutil - lit_config.note('Found python psutil module') - config.available_features.add("python-psutil") -except ImportError: - lit_config.warning('Could not import psutil. Some tests will be skipped and' - ' the --timeout command line argument will not work.') - -if sys.platform.startswith('win') or sys.platform.startswith('cygwin'): - config.available_features.add('windows') - -# Add llvm and lit tools directories if this config is being loaded indirectly. -path = config.environment['PATH'] -for attribute in ('llvm_tools_dir', 'lit_tools_dir'): - directory = getattr(config, attribute, None) - if directory: - path = os.path.pathsep.join((directory, path)) -config.environment['PATH'] = path diff --git a/gnu/llvm/utils/lit/tests/lit.site.cfg.in b/gnu/llvm/utils/lit/tests/lit.site.cfg.in deleted file mode 100644 index 693364c7c97..00000000000 --- a/gnu/llvm/utils/lit/tests/lit.site.cfg.in +++ /dev/null @@ -1,20 +0,0 @@ -@LIT_SITE_CFG_IN_HEADER@ - -import sys - -config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" -config.llvm_src_root = "@LLVM_SOURCE_DIR@" -config.llvm_obj_root = "@LLVM_BINARY_DIR@" -config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" - -# Support substitution of the tools_dir with user parameters. -# This is used when we can't determine the tool dir at configuration time. -try: - config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params -except KeyError: - e = sys.exc_info()[1] - key, = e.args - lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) - -# Let the main config do the real work. -lit_config.load_config(config, "@LLVM_BINARY_DIR@/utils/lit/tests/lit.cfg") diff --git a/gnu/llvm/utils/lit/tests/max-failures.py b/gnu/llvm/utils/lit/tests/max-failures.py deleted file mode 100644 index ca107bc29b9..00000000000 --- a/gnu/llvm/utils/lit/tests/max-failures.py +++ /dev/null @@ -1,14 +0,0 @@ -# Check the behavior of --max-failures option. -# -# RUN: not %{lit} -j 1 -v %{inputs}/max-failures > %t.out -# RUN: not %{lit} --max-failures=1 -j 1 -v %{inputs}/max-failures >> %t.out -# RUN: not %{lit} --max-failures=2 -j 1 -v %{inputs}/max-failures >> %t.out -# RUN: not %{lit} --max-failures=0 -j 1 -v %{inputs}/max-failures 2>> %t.out -# RUN: FileCheck < %t.out %s -# -# END. - -# CHECK: Failing Tests (27) -# CHECK: Failing Tests (1) -# CHECK: Failing Tests (2) -# CHECK: error: Setting --max-failures to 0 does not have any effect. diff --git a/gnu/llvm/utils/lit/tests/progress-bar.py b/gnu/llvm/utils/lit/tests/progress-bar.py deleted file mode 100644 index d0467485082..00000000000 --- a/gnu/llvm/utils/lit/tests/progress-bar.py +++ /dev/null @@ -1,13 +0,0 @@ -# Check the simple progress bar. -# -# RUN: not %{lit} -j 1 -s %{inputs}/progress-bar > %t.out -# RUN: FileCheck < %t.out %s -# -# CHECK: Testing: 0 .. 10.. 20 -# CHECK: FAIL: shtest-shell :: test-1.txt (1 of 4) -# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. -# CHECK: FAIL: shtest-shell :: test-2.txt (2 of 4) -# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70 -# CHECK: FAIL: shtest-shell :: test-3.txt (3 of 4) -# CHECK: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. -# CHECK: FAIL: shtest-shell :: test-4.txt (4 of 4) diff --git a/gnu/llvm/utils/lit/tests/selecting.py b/gnu/llvm/utils/lit/tests/selecting.py deleted file mode 100644 index 25ac299d865..00000000000 --- a/gnu/llvm/utils/lit/tests/selecting.py +++ /dev/null @@ -1,94 +0,0 @@ -# RUN: %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-BASIC %s -# CHECK-BASIC: Testing: 5 tests - -# Check that regex-filtering works -# -# RUN: %{lit} --filter 'o[a-z]e' %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s -# CHECK-FILTER: Testing: 2 of 5 tests - -# Check that regex-filtering based on environment variables work. -# -# RUN: env LIT_FILTER='o[a-z]e' %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER-ENV %s -# CHECK-FILTER-ENV: Testing: 2 of 5 tests - - -# Check that maximum counts work -# -# RUN: %{lit} --max-tests 3 %{inputs}/discovery | FileCheck --check-prefix=CHECK-MAX %s -# CHECK-MAX: Testing: 3 of 5 tests - - -# Check that sharding partitions the testsuite in a way that distributes the -# rounding error nicely (i.e. 5/3 => 2 2 1, not 1 1 3 or whatever) -# -# RUN: %{lit} --num-shards 3 --run-shard 1 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD0-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD0-OUT < %t.out %s -# CHECK-SHARD0-ERR: note: Selecting shard 1/3 = size 2/5 = tests #(3*k)+1 = [1, 4] -# CHECK-SHARD0-OUT: Testing: 2 of 5 tests -# -# RUN: %{lit} --num-shards 3 --run-shard 2 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD1-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD1-OUT < %t.out %s -# CHECK-SHARD1-ERR: note: Selecting shard 2/3 = size 2/5 = tests #(3*k)+2 = [2, 5] -# CHECK-SHARD1-OUT: Testing: 2 of 5 tests -# -# RUN: %{lit} --num-shards 3 --run-shard 3 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD2-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD2-OUT < %t.out %s -# CHECK-SHARD2-ERR: note: Selecting shard 3/3 = size 1/5 = tests #(3*k)+3 = [3] -# CHECK-SHARD2-OUT: Testing: 1 of 5 tests - - -# Check that sharding via env vars works. -# -# RUN: env LIT_NUM_SHARDS=3 LIT_RUN_SHARD=1 %{lit} %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD0-ENV-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD0-ENV-OUT < %t.out %s -# CHECK-SHARD0-ENV-ERR: note: Selecting shard 1/3 = size 2/5 = tests #(3*k)+1 = [1, 4] -# CHECK-SHARD0-ENV-OUT: Testing: 2 of 5 tests -# -# RUN: env LIT_NUM_SHARDS=3 LIT_RUN_SHARD=2 %{lit} %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD1-ENV-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD1-ENV-OUT < %t.out %s -# CHECK-SHARD1-ENV-ERR: note: Selecting shard 2/3 = size 2/5 = tests #(3*k)+2 = [2, 5] -# CHECK-SHARD1-ENV-OUT: Testing: 2 of 5 tests -# -# RUN: env LIT_NUM_SHARDS=3 LIT_RUN_SHARD=3 %{lit} %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD2-ENV-ERR < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD2-ENV-OUT < %t.out %s -# CHECK-SHARD2-ENV-ERR: note: Selecting shard 3/3 = size 1/5 = tests #(3*k)+3 = [3] -# CHECK-SHARD2-ENV-OUT: Testing: 1 of 5 tests - - -# Check that providing more shards than tests results in 1 test per shard -# until we run out, then 0. -# -# RUN: %{lit} --num-shards 100 --run-shard 2 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-ERR1 < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-OUT1 < %t.out %s -# CHECK-SHARD-BIG-ERR1: note: Selecting shard 2/100 = size 1/5 = tests #(100*k)+2 = [2] -# CHECK-SHARD-BIG-OUT1: Testing: 1 of 5 tests -# -# RUN: %{lit} --num-shards 100 --run-shard 6 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-ERR2 < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-OUT2 < %t.out %s -# CHECK-SHARD-BIG-ERR2: note: Selecting shard 6/100 = size 0/5 = tests #(100*k)+6 = [] -# CHECK-SHARD-BIG-OUT2: Testing: 0 of 5 tests -# -# RUN: %{lit} --num-shards 100 --run-shard 50 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-ERR3 < %t.err %s -# RUN: FileCheck --check-prefix=CHECK-SHARD-BIG-OUT3 < %t.out %s -# CHECK-SHARD-BIG-ERR3: note: Selecting shard 50/100 = size 0/5 = tests #(100*k)+50 = [] -# CHECK-SHARD-BIG-OUT3: Testing: 0 of 5 tests - - -# Check that range constraints are enforced -# -# RUN: not %{lit} --num-shards 0 --run-shard 2 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD-ERR < %t.err %s -# CHECK-SHARD-ERR: error: --num-shards must be positive -# -# RUN: not %{lit} --num-shards 3 --run-shard 4 %{inputs}/discovery >%t.out 2>%t.err -# RUN: FileCheck --check-prefix=CHECK-SHARD-ERR2 < %t.err %s -# CHECK-SHARD-ERR2: error: --run-shard must be between 1 and --num-shards (inclusive) diff --git a/gnu/llvm/utils/lit/tests/shell-parsing.py b/gnu/llvm/utils/lit/tests/shell-parsing.py deleted file mode 100644 index a07e988861f..00000000000 --- a/gnu/llvm/utils/lit/tests/shell-parsing.py +++ /dev/null @@ -1,3 +0,0 @@ -# Just run the ShUtil unit tests. -# -# RUN: %{python} -m lit.ShUtil diff --git a/gnu/llvm/utils/lit/tests/shtest-encoding.py b/gnu/llvm/utils/lit/tests/shtest-encoding.py deleted file mode 100644 index dfc987f6df7..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-encoding.py +++ /dev/null @@ -1,3 +0,0 @@ -# RUN: true - -# Here is a string that cannot be decoded in line mode: Â. diff --git a/gnu/llvm/utils/lit/tests/shtest-format.py b/gnu/llvm/utils/lit/tests/shtest-format.py deleted file mode 100644 index 8c318697195..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-format.py +++ /dev/null @@ -1,170 +0,0 @@ -# Check the various features of the ShTest format. -# -# RUN: rm -f %t.xml -# RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out -# RUN: FileCheck < %t.out %s -# RUN: FileCheck --check-prefix=XUNIT < %t.xml %s - -# END. - -# 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): -# CHECK-NEXT: -- -# CHECK-NEXT: line 1: failed test output on stdout -# CHECK-NEXT: line 2: failed test output on stdout -# CHECK: Command Output (stderr): -# CHECK-NEXT: -- -# CHECK-NEXT: cat{{(\.exe)?}}: does-not-exist: No such file or directory -# CHECK: -- - -# CHECK: FAIL: shtest-format :: external_shell/fail_with_bad_encoding.txt -# CHECK-NEXT: *** TEST 'shtest-format :: external_shell/fail_with_bad_encoding.txt' FAILED *** -# CHECK: Command Output (stdout): -# CHECK-NEXT: -- -# CHECK-NEXT: a line with bad encoding: -# CHECK: -- - -# CHECK: PASS: shtest-format :: external_shell/pass.txt - -# CHECK: FAIL: shtest-format :: fail.txt -# CHECK-NEXT: *** TEST 'shtest-format :: fail.txt' FAILED *** -# CHECK-NEXT: Script: -# CHECK-NEXT: -- -# CHECK-NEXT: printf "line 1 -# CHECK-NEXT: false -# CHECK-NEXT: -- -# CHECK-NEXT: Exit Code: 1 -# -# CHECK: Command Output (stdout): -# CHECK-NEXT: -- -# CHECK-NEXT: $ ":" "RUN: at line 1" -# CHECK-NEXT: $ "printf" -# CHECK-NEXT: # command output: -# CHECK-NEXT: line 1: failed test output on stdout -# CHECK-NEXT: line 2: failed test output on stdout - -# CHECK: UNRESOLVED: shtest-format :: no-test-line.txt -# CHECK: PASS: shtest-format :: pass.txt -# CHECK: UNSUPPORTED: shtest-format :: requires-any-missing.txt -# CHECK: PASS: shtest-format :: requires-any-present.txt -# CHECK: UNSUPPORTED: shtest-format :: requires-missing.txt -# CHECK: PASS: shtest-format :: requires-present.txt -# CHECK: UNRESOLVED: shtest-format :: requires-star.txt -# CHECK: UNSUPPORTED: shtest-format :: requires-triple.txt -# CHECK: PASS: shtest-format :: unsupported-expr-false.txt -# CHECK: UNSUPPORTED: shtest-format :: unsupported-expr-true.txt -# CHECK: UNRESOLVED: shtest-format :: unsupported-star.txt -# CHECK: UNSUPPORTED: shtest-format :: unsupported_dir/some-test.txt -# CHECK: PASS: shtest-format :: xfail-expr-false.txt -# CHECK: XFAIL: shtest-format :: xfail-expr-true.txt -# CHECK: XFAIL: shtest-format :: xfail-feature.txt -# CHECK: XFAIL: shtest-format :: xfail-target.txt -# CHECK: XFAIL: shtest-format :: xfail.txt -# CHECK: XPASS: shtest-format :: xpass.txt -# CHECK-NEXT: *** TEST 'shtest-format :: xpass.txt' FAILED *** -# CHECK-NEXT: Script -# CHECK-NEXT: -- -# CHECK-NEXT: true -# CHECK-NEXT: -- -# CHECK: Testing Time - -# CHECK: Unexpected Passing Tests (1) -# CHECK: shtest-format :: xpass.txt - -# CHECK: Failing Tests (3) -# CHECK: shtest-format :: external_shell/fail.txt -# CHECK: shtest-format :: external_shell/fail_with_bad_encoding.txt -# CHECK: shtest-format :: fail.txt - -# CHECK: Expected Passes : 7 -# CHECK: Expected Failures : 4 -# CHECK: Unsupported Tests : 5 -# CHECK: Unresolved Tests : 3 -# CHECK: Unexpected Passes : 1 -# CHECK: Unexpected Failures: 3 - - -# XUNIT: <?xml version="1.0" encoding="UTF-8" ?> -# XUNIT-NEXT: <testsuites> -# XUNIT-NEXT: <testsuite name="shtest-format" tests="23" failures="7" skipped="5"> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="argv0.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.external_shell" name="fail.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - - -# XUNIT: <testcase classname="shtest-format.external_shell" name="fail_with_bad_encoding.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - -# XUNIT: <testcase classname="shtest-format.external_shell" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="fail.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="no-test-line.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="pass.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-missing.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature || a-missing-feature-2" /> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-any-present.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-missing.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT:<skipped message="Skipping because of: a-missing-feature" /> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-present.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-star.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="requires-triple.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT:<skipped message="Skipping because of: x86_64" /> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-expr-true.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT:<skipped message="Skipping because of configuration." /> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="unsupported-star.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - -# XUNIT: <testcase classname="shtest-format.unsupported_dir" name="some-test.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT:<skipped message="Skipping because of configuration." /> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-false.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-expr-true.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-feature.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail-target.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xfail.txt" time="{{[0-9]+\.[0-9]+}}"/> - -# XUNIT: <testcase classname="shtest-format.shtest-format" name="xpass.txt" time="{{[0-9]+\.[0-9]+}}"> -# XUNIT-NEXT: <failure{{[ ]*}}> -# XUNIT: </failure> -# XUNIT-NEXT: </testcase> - -# XUNIT: </testsuite> -# XUNIT-NEXT: </testsuites> diff --git a/gnu/llvm/utils/lit/tests/shtest-output-printing.py b/gnu/llvm/utils/lit/tests/shtest-output-printing.py deleted file mode 100644 index 2344ef20036..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-output-printing.py +++ /dev/null @@ -1,31 +0,0 @@ -# Check the various features of the ShTest format. -# -# RUN: not %{lit} -j 1 -v %{inputs}/shtest-output-printing > %t.out -# RUN: FileCheck --input-file %t.out %s -# -# END. - -# CHECK: -- Testing: - -# CHECK: FAIL: shtest-output-printing :: basic.txt -# CHECK-NEXT: *** TEST 'shtest-output-printing :: basic.txt' FAILED *** -# CHECK-NEXT: Script: -# CHECK-NEXT: -- -# CHECK: -- -# CHECK-NEXT: Exit Code: 1 -# -# CHECK: Command Output -# CHECK-NEXT: -- -# CHECK-NEXT: $ ":" "RUN: at line 1" -# CHECK-NEXT: $ "true" -# CHECK-NEXT: $ ":" "RUN: at line 2" -# CHECK-NEXT: $ "echo" "hi" -# CHECK-NEXT: # command output: -# CHECK-NEXT: hi -# -# CHECK: $ ":" "RUN: at line 3" -# CHECK-NEXT: $ "wc" "missing-file" -# CHECK-NEXT: # redirected output from '{{.*(/|\\\\)}}basic.txt.tmp.out': -# CHECK-NEXT: missing-file{{.*}} No such file or directory -# CHECK: note: command had no output on stdout or stderr -# CHECK-NEXT: error: command failed with exit status: 1 diff --git a/gnu/llvm/utils/lit/tests/shtest-run-at-line.py b/gnu/llvm/utils/lit/tests/shtest-run-at-line.py deleted file mode 100644 index 7e5d53b8e26..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-run-at-line.py +++ /dev/null @@ -1,70 +0,0 @@ -# Check that -vv makes the line number of the failing RUN command clear. -# (-v is actually sufficient in the case of the internal shell.) -# -# RUN: env -u FILECHECK_OPTS not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out -# RUN: FileCheck --input-file %t.out %s -# -# END. - - -# CHECK: Testing: 4 tests - - -# In the case of the external shell, we check for only RUN lines in stderr in -# case some shell implementations format "set -x" output differently. - -# CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/basic.txt - -# CHECK: Script: -# CHECK: RUN: at line 4{{.*}} true -# CHECK-NEXT: RUN: at line 5{{.*}} false -# CHECK-NEXT: RUN: at line 6{{.*}} true - -# CHECK: RUN: at line 4 -# CHECK: RUN: at line 5 -# CHECK-NOT: RUN - -# CHECK-LABEL: FAIL: shtest-run-at-line :: external-shell/line-continuation.txt - -# CHECK: Script: -# CHECK: RUN: at line 4{{.*}} echo 'foo bar' | FileCheck -# CHECK-NEXT: RUN: at line 6{{.*}} echo 'foo baz' | FileCheck -# CHECK-NEXT: RUN: at line 9{{.*}} echo 'foo bar' | FileCheck - -# CHECK: RUN: at line 4 -# CHECK: RUN: at line 6 -# CHECK-NOT: RUN - - -# CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/basic.txt - -# CHECK: Script: -# CHECK: : 'RUN: at line 1'; true -# CHECK-NEXT: : 'RUN: at line 2'; false -# CHECK-NEXT: : 'RUN: at line 3'; true - -# CHECK: Command Output (stdout) -# CHECK: $ ":" "RUN: at line 1" -# CHECK-NEXT: $ "true" -# CHECK-NEXT: $ ":" "RUN: at line 2" -# CHECK-NEXT: $ "false" -# CHECK-NOT: RUN - -# CHECK-LABEL: FAIL: shtest-run-at-line :: internal-shell/line-continuation.txt - -# CHECK: Script: -# CHECK: : 'RUN: at line 1'; : first line continued to second line -# CHECK-NEXT: : 'RUN: at line 3'; echo 'foo bar' | FileCheck -# CHECK-NEXT: : 'RUN: at line 5'; echo 'foo baz' | FileCheck -# CHECK-NEXT: : 'RUN: at line 8'; echo 'foo bar' | FileCheck - -# CHECK: Command Output (stdout) -# CHECK: $ ":" "RUN: at line 1" -# CHECK-NEXT: $ ":" "first" "line" "continued" "to" "second" "line" -# CHECK-NEXT: $ ":" "RUN: at line 3" -# CHECK-NEXT: $ "echo" "foo bar" -# CHECK-NEXT: $ "FileCheck" "{{.*}}" -# CHECK-NEXT: $ ":" "RUN: at line 5" -# CHECK-NEXT: $ "echo" "foo baz" -# CHECK-NEXT: $ "FileCheck" "{{.*}}" -# CHECK-NOT: RUN diff --git a/gnu/llvm/utils/lit/tests/shtest-shell.py b/gnu/llvm/utils/lit/tests/shtest-shell.py deleted file mode 100644 index ed0bdf35fe1..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-shell.py +++ /dev/null @@ -1,230 +0,0 @@ -# Check the internal shell handling component of the ShTest format. -# -# RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out -# FIXME: Temporarily dump test output so we can debug failing tests on -# buildbots. -# RUN: cat %t.out -# RUN: FileCheck --input-file %t.out %s -# -# END. - -# CHECK: -- Testing: - -# CHECK: FAIL: shtest-shell :: cat-error-0.txt -# CHECK: *** TEST 'shtest-shell :: cat-error-0.txt' FAILED *** -# CHECK: $ "cat" "-b" "temp1.txt" -# CHECK: # command stderr: -# CHECK: Unsupported: 'cat': option -b not recognized -# CHECK: error: command failed with exit status: 1 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: cat-error-1.txt -# CHECK: *** TEST 'shtest-shell :: cat-error-1.txt' FAILED *** -# CHECK: $ "cat" "temp1.txt" -# CHECK: # command stderr: -# CHECK: [Errno 2] No such file or directory: 'temp1.txt' -# CHECK: error: command failed with exit status: 1 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: colon-error.txt -# CHECK: *** TEST 'shtest-shell :: colon-error.txt' FAILED *** -# CHECK: $ ":" -# CHECK: # command stderr: -# CHECK: Unsupported: ':' cannot be part of a pipeline -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-0.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-0.txt' FAILED *** -# CHECK: $ "diff" "diff-error-0.txt" "diff-error-0.txt" -# CHECK: # command stderr: -# CHECK: Unsupported: 'diff' cannot be part of a pipeline -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-1.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-1.txt' FAILED *** -# CHECK: $ "diff" "-B" "temp1.txt" "temp2.txt" -# CHECK: # command stderr: -# CHECK: Unsupported: 'diff': option -B not recognized -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-2.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-2.txt' FAILED *** -# CHECK: $ "diff" "temp.txt" -# CHECK: # command stderr: -# CHECK: Error: missing or extra operand -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-3.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-3.txt' FAILED *** -# CHECK: $ "diff" "temp.txt" "temp1.txt" -# CHECK: # command stderr: -# CHECK: Error: 'diff' command failed -# CHECK: error: command failed with exit status: 1 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-4.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-4.txt' FAILED *** -# CHECK: Exit Code: 1 -# CHECK: # command output: -# CHECK: diff-error-4.txt.tmp -# CHECK: diff-error-4.txt.tmp1 -# CHECK: *** 1 **** -# CHECK: ! hello-first -# CHECK: --- 1 ---- -# CHECK: ! hello-second -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-5.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-5.txt' FAILED *** -# CHECK: $ "diff" -# CHECK: # command stderr: -# CHECK: Error: missing or extra operand -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-error-6.txt -# CHECK: *** TEST 'shtest-shell :: diff-error-6.txt' FAILED *** -# CHECK: $ "diff" -# CHECK: # command stderr: -# CHECK: Error: missing or extra operand -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: diff-r-error-0.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-0.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: Only in {{.*}}dir1: dir1unique -# CHECK: Only in {{.*}}dir2: dir2unique -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-1.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-1.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: *** {{.*}}dir1{{.*}}subdir{{.*}}f01 -# CHECK: --- {{.*}}dir2{{.*}}subdir{{.*}}f01 -# CHECK: 12345 -# CHECK: 00000 -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-2.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-2.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: Only in {{.*}}dir2: extrafile -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-3.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-3.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: Only in {{.*}}dir1: extra_subdir -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-4.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-4.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-5.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-5.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: Only in {{.*}}dir1: extra_subdir -# CHECK: error: command failed with exit status: 1 - -# CHECK: FAIL: shtest-shell :: diff-r-error-6.txt -# CHECK: *** TEST 'shtest-shell :: diff-r-error-6.txt' FAILED *** -# CEHCK: $ "diff" "-r" -# CHECK: # command output: -# CHECK: File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory -# CHECK: error: command failed with exit status: 1 - -# CHECK: PASS: shtest-shell :: diff-r.txt - -# CHECK: FAIL: shtest-shell :: error-0.txt -# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED *** -# CHECK: $ "not-a-real-command" -# CHECK: # command stderr: -# CHECK: 'not-a-real-command': command not found -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# FIXME: The output here sucks. -# -# CHECK: FAIL: shtest-shell :: error-1.txt -# CHECK: *** TEST 'shtest-shell :: error-1.txt' FAILED *** -# CHECK: shell parser error on: ': \'RUN: at line 3\'; echo "missing quote' -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: error-2.txt -# CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED *** -# CHECK: Unsupported redirect: -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: mkdir-error-0.txt -# CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED *** -# CHECK: $ "mkdir" "-p" "temp" -# CHECK: # command stderr: -# CHECK: Unsupported: 'mkdir' cannot be part of a pipeline -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: mkdir-error-1.txt -# CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED *** -# CHECK: $ "mkdir" "-p" "-m" "777" "temp" -# CHECK: # command stderr: -# CHECK: Unsupported: 'mkdir': option -m not recognized -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: mkdir-error-2.txt -# CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED *** -# CHECK: $ "mkdir" "-p" -# CHECK: # command stderr: -# CHECK: Error: 'mkdir' is missing an operand -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: PASS: shtest-shell :: redirects.txt - -# CHECK: FAIL: shtest-shell :: rm-error-0.txt -# CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED *** -# CHECK: $ "rm" "-rf" "temp" -# CHECK: # command stderr: -# CHECK: Unsupported: 'rm' cannot be part of a pipeline -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: rm-error-1.txt -# CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED *** -# CHECK: $ "rm" "-f" "-v" "temp" -# CHECK: # command stderr: -# CHECK: Unsupported: 'rm': option -v not recognized -# CHECK: error: command failed with exit status: 127 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: rm-error-2.txt -# CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED *** -# CHECK: $ "rm" "-r" "hello" -# CHECK: # command stderr: -# CHECK: Error: 'rm' command failed -# CHECK: error: command failed with exit status: 1 -# CHECK: *** - -# CHECK: FAIL: shtest-shell :: rm-error-3.txt -# CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED *** -# CHECK: Exit Code: 1 -# CHECK: *** - -# CHECK: PASS: shtest-shell :: sequencing-0.txt -# CHECK: XFAIL: shtest-shell :: sequencing-1.txt -# CHECK: PASS: shtest-shell :: valid-shell.txt -# CHECK: Failing Tests (27) diff --git a/gnu/llvm/utils/lit/tests/shtest-timeout.py b/gnu/llvm/utils/lit/tests/shtest-timeout.py deleted file mode 100644 index 9ed8ebe8ddd..00000000000 --- a/gnu/llvm/utils/lit/tests/shtest-timeout.py +++ /dev/null @@ -1,75 +0,0 @@ -# REQUIRES: python-psutil - -# llvm.org/PR33944 -# REQUIRES: nowindows - -# FIXME: This test is fragile because it relies on time which can -# be affected by system performance. In particular we are currently -# assuming that `short.py` can be successfully executed within 2 -# seconds of wallclock time. - -# Test per test timeout using external shell -# RUN: not %{lit} \ -# RUN: %{inputs}/shtest-timeout/infinite_loop.py \ -# RUN: %{inputs}/shtest-timeout/short.py \ -# RUN: -j 1 -v --debug --timeout 2 --param external=1 > %t.extsh.out 2> %t.extsh.err -# RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.extsh.out %s -# RUN: FileCheck --check-prefix=CHECK-EXTSH-ERR < %t.extsh.err %s -# -# CHECK-EXTSH-ERR: Using external shell - -# Test per test timeout using internal shell -# RUN: not %{lit} \ -# RUN: %{inputs}/shtest-timeout/infinite_loop.py \ -# RUN: %{inputs}/shtest-timeout/short.py \ -# RUN: -j 1 -v --debug --timeout 2 --param external=0 > %t.intsh.out 2> %t.intsh.err -# RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.intsh.out %s -# RUN: FileCheck --check-prefix=CHECK-INTSH-OUT < %t.intsh.out %s -# RUN: FileCheck --check-prefix=CHECK-INTSH-ERR < %t.intsh.err %s - -# CHECK-INTSH-OUT: TIMEOUT: per_test_timeout :: infinite_loop.py -# CHECK-INTSH-OUT: command output: -# CHECK-INTSH-OUT: command reached timeout: True - -# CHECK-INTSH-ERR: Using internal shell - -# Test per test timeout set via a config file rather than on the command line -# RUN: not %{lit} \ -# RUN: %{inputs}/shtest-timeout/infinite_loop.py \ -# RUN: %{inputs}/shtest-timeout/short.py \ -# RUN: -j 1 -v --debug --param external=0 \ -# RUN: --param set_timeout=2 > %t.cfgset.out 2> %t.cfgset.err -# RUN: FileCheck --check-prefix=CHECK-OUT-COMMON < %t.cfgset.out %s -# RUN: FileCheck --check-prefix=CHECK-CFGSET-ERR < %t.cfgset.err %s -# -# CHECK-CFGSET-ERR: Using internal shell - -# CHECK-OUT-COMMON: TIMEOUT: per_test_timeout :: infinite_loop.py -# CHECK-OUT-COMMON: Timeout: Reached timeout of 2 seconds -# CHECK-OUT-COMMON: Command {{([0-9]+ )?}}Output - -# CHECK-OUT-COMMON: PASS: per_test_timeout :: short.py - -# CHECK-OUT-COMMON: Expected Passes{{ *}}: 1 -# CHECK-OUT-COMMON: Individual Timeouts{{ *}}: 1 - -# Test per test timeout via a config file and on the command line. -# The value set on the command line should override the config file. -# RUN: not %{lit} \ -# RUN: %{inputs}/shtest-timeout/infinite_loop.py \ -# RUN: %{inputs}/shtest-timeout/short.py \ -# RUN: -j 1 -v --debug --param external=0 \ -# RUN: --param set_timeout=1 --timeout=2 > %t.cmdover.out 2> %t.cmdover.err -# RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-OUT < %t.cmdover.out %s -# RUN: FileCheck --check-prefix=CHECK-CMDLINE-OVERRIDE-ERR < %t.cmdover.err %s - -# CHECK-CMDLINE-OVERRIDE-ERR: Forcing timeout to be 2 seconds - -# CHECK-CMDLINE-OVERRIDE-OUT: TIMEOUT: per_test_timeout :: infinite_loop.py -# CHECK-CMDLINE-OVERRIDE-OUT: Timeout: Reached timeout of 2 seconds -# CHECK-CMDLINE-OVERRIDE-OUT: Command {{([0-9]+ )?}}Output - -# CHECK-CMDLINE-OVERRIDE-OUT: PASS: per_test_timeout :: short.py - -# CHECK-CMDLINE-OVERRIDE-OUT: Expected Passes{{ *}}: 1 -# CHECK-CMDLINE-OVERRIDE-OUT: Individual Timeouts{{ *}}: 1 diff --git a/gnu/llvm/utils/lit/tests/test-data-micro.py b/gnu/llvm/utils/lit/tests/test-data-micro.py deleted file mode 100644 index 634139e233f..00000000000 --- a/gnu/llvm/utils/lit/tests/test-data-micro.py +++ /dev/null @@ -1,21 +0,0 @@ -# Test features related to formats which support reporting additional test data. -# and multiple test results. - -# RUN: %{lit} -j 1 -v %{inputs}/test-data-micro | FileCheck %s - -# CHECK: -- Testing: - -# CHECK: PASS: test-data-micro :: micro-tests.ini -# CHECK-NEXT: *** TEST 'test-data-micro :: micro-tests.ini' RESULTS *** -# CHECK-NEXT: value0: 1 -# CHECK-NEXT: value1: 2.3456 -# CHECK-NEXT: *** -# CHECK-NEXT: *** MICRO-TEST: test0 -# CHECK-NEXT: micro_value0: 4 -# CHECK-NEXT: micro_value1: 1.3 -# CHECK-NEXT: *** MICRO-TEST: test1 -# CHECK-NEXT: micro_value0: 4 -# CHECK-NEXT: micro_value1: 1.3 -# CHECK-NEXT: *** MICRO-TEST: test2 -# CHECK-NEXT: micro_value0: 4 -# CHECK-NEXT: micro_value1: 1.3 diff --git a/gnu/llvm/utils/lit/tests/test-data.py b/gnu/llvm/utils/lit/tests/test-data.py deleted file mode 100644 index 54909d7338e..00000000000 --- a/gnu/llvm/utils/lit/tests/test-data.py +++ /dev/null @@ -1,12 +0,0 @@ -# Test features related to formats which support reporting additional test data. - -# RUN: %{lit} -j 1 -v %{inputs}/test-data > %t.out -# RUN: FileCheck < %t.out %s - -# CHECK: -- Testing: - -# CHECK: PASS: test-data :: metrics.ini -# CHECK-NEXT: *** TEST 'test-data :: metrics.ini' RESULTS *** -# CHECK-NEXT: value0: 1 -# CHECK-NEXT: value1: 2.3456 -# CHECK-NEXT: *** diff --git a/gnu/llvm/utils/lit/tests/test-output-micro.py b/gnu/llvm/utils/lit/tests/test-output-micro.py deleted file mode 100644 index 4357fe88f90..00000000000 --- a/gnu/llvm/utils/lit/tests/test-output-micro.py +++ /dev/null @@ -1,51 +0,0 @@ -# RUN: %{lit} -j 1 -v %{inputs}/test-data-micro --output %t.results.out -# RUN: FileCheck < %t.results.out %s -# RUN: rm %t.results.out - - -# CHECK: { -# CHECK: "__version__" -# CHECK: "elapsed" -# CHECK-NEXT: "tests": [ -# CHECK-NEXT: { -# CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": null, -# CHECK-NEXT: "metrics": { -# CHECK-NEXT: "micro_value0": 4, -# CHECK-NEXT: "micro_value1": 1.3 -# CHECK-NEXT: }, -# CHECK-NEXT: "name": "test-data-micro :: micro-tests.ini:test{{[0-2]}}", -# CHECK-NEXT: "output": "" -# CHECK-NEXT: }, -# CHECK-NEXT: { -# CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": null, -# CHECK-NEXT: "metrics": { -# CHECK-NEXT: "micro_value0": 4, -# CHECK-NEXT: "micro_value1": 1.3 -# CHECK-NEXT: }, -# CHECK-NEXT: "name": "test-data-micro :: micro-tests.ini:test{{[0-2]}}", -# CHECK-NEXT: "output": "" -# CHECK-NEXT: }, -# CHECK-NEXT: { -# CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": null, -# CHECK-NEXT: "metrics": { -# CHECK-NEXT: "micro_value0": 4, -# CHECK-NEXT: "micro_value1": 1.3 -# CHECK-NEXT: }, -# CHECK-NEXT: "name": "test-data-micro :: micro-tests.ini:test{{[0-2]}}", -# CHECK-NEXT: "output": "" -# CHECK-NEXT: }, -# CHECK-NEXT: { -# CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": {{[0-9.]+}}, -# CHECK-NEXT: "metrics": { -# CHECK-NEXT: "value0": 1, -# CHECK-NEXT: "value1": 2.3456 -# CHECK-NEXT: }, -# CHECK-NEXT: "name": "test-data-micro :: micro-tests.ini", -# CHECK-NEXT: "output": "Test passed." -# CHECK-NEXT: } -# CHECK-NEXT: ] -# CHECK-NEXT: } diff --git a/gnu/llvm/utils/lit/tests/test-output.py b/gnu/llvm/utils/lit/tests/test-output.py deleted file mode 100644 index a50442741b9..00000000000 --- a/gnu/llvm/utils/lit/tests/test-output.py +++ /dev/null @@ -1,19 +0,0 @@ -# RUN: %{lit} -j 1 -v %{inputs}/test-data --output %t.results.out > %t.out -# RUN: FileCheck < %t.results.out %s - -# CHECK: { -# CHECK: "__version__" -# CHECK: "elapsed" -# CHECK-NEXT: "tests": [ -# CHECK-NEXT: { -# CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": {{[0-9.]+}}, -# CHECK-NEXT: "metrics": { -# CHECK-NEXT: "value0": 1, -# CHECK-NEXT: "value1": 2.3456 -# CHECK-NEXT: } -# CHECK-NEXT: "name": "test-data :: metrics.ini", -# CHECK-NEXT: "output": "Test passed." -# CHECK-NEXT: } -# CHECK-NEXT: ] -# CHECK-NEXT: } diff --git a/gnu/llvm/utils/lit/tests/unit/ShUtil.py b/gnu/llvm/utils/lit/tests/unit/ShUtil.py deleted file mode 100644 index 9cf42dbbcef..00000000000 --- a/gnu/llvm/utils/lit/tests/unit/ShUtil.py +++ /dev/null @@ -1,112 +0,0 @@ -# RUN: %{python} %s - -import unittest - -from lit.ShUtil import Command, Pipeline, Seq, ShLexer, ShParser - - -class TestShLexer(unittest.TestCase): - def lex(self, str, *args, **kwargs): - return list(ShLexer(str, *args, **kwargs).lex()) - - def test_basic(self): - self.assertEqual(self.lex('a|b>c&d<e;f'), - ['a', ('|',), 'b', ('>',), 'c', ('&',), 'd', - ('<',), 'e', (';',), 'f']) - - def test_redirection_tokens(self): - self.assertEqual(self.lex('a2>c'), - ['a2', ('>',), 'c']) - self.assertEqual(self.lex('a 2>c'), - ['a', ('>',2), 'c']) - - def test_quoting(self): - self.assertEqual(self.lex(""" 'a' """), - ['a']) - self.assertEqual(self.lex(""" "hello\\"world" """), - ['hello"world']) - self.assertEqual(self.lex(""" "hello\\'world" """), - ["hello\\'world"]) - self.assertEqual(self.lex(""" "hello\\\\world" """), - ["hello\\world"]) - self.assertEqual(self.lex(""" he"llo wo"rld """), - ["hello world"]) - self.assertEqual(self.lex(""" a\\ b a\\\\b """), - ["a b", "a\\b"]) - self.assertEqual(self.lex(""" "" "" """), - ["", ""]) - self.assertEqual(self.lex(""" a\\ b """, win32Escapes = True), - ['a\\', 'b']) - -class TestShParse(unittest.TestCase): - def parse(self, str): - return ShParser(str).parse() - - def test_basic(self): - self.assertEqual(self.parse('echo hello'), - Pipeline([Command(['echo', 'hello'], [])], False)) - self.assertEqual(self.parse('echo ""'), - Pipeline([Command(['echo', ''], [])], False)) - self.assertEqual(self.parse("""echo -DFOO='a'"""), - Pipeline([Command(['echo', '-DFOO=a'], [])], False)) - self.assertEqual(self.parse('echo -DFOO="a"'), - Pipeline([Command(['echo', '-DFOO=a'], [])], False)) - - def test_redirection(self): - self.assertEqual(self.parse('echo hello > c'), - Pipeline([Command(['echo', 'hello'], - [((('>'),), 'c')])], False)) - self.assertEqual(self.parse('echo hello > c >> d'), - Pipeline([Command(['echo', 'hello'], [(('>',), 'c'), - (('>>',), 'd')])], False)) - self.assertEqual(self.parse('a 2>&1'), - Pipeline([Command(['a'], [(('>&',2), '1')])], False)) - - def test_pipeline(self): - self.assertEqual(self.parse('a | b'), - Pipeline([Command(['a'], []), - Command(['b'], [])], - False)) - - self.assertEqual(self.parse('a | b | c'), - Pipeline([Command(['a'], []), - Command(['b'], []), - Command(['c'], [])], - False)) - - def test_list(self): - self.assertEqual(self.parse('a ; b'), - Seq(Pipeline([Command(['a'], [])], False), - ';', - Pipeline([Command(['b'], [])], False))) - - self.assertEqual(self.parse('a & b'), - Seq(Pipeline([Command(['a'], [])], False), - '&', - Pipeline([Command(['b'], [])], False))) - - self.assertEqual(self.parse('a && b'), - Seq(Pipeline([Command(['a'], [])], False), - '&&', - Pipeline([Command(['b'], [])], False))) - - self.assertEqual(self.parse('a || b'), - Seq(Pipeline([Command(['a'], [])], False), - '||', - Pipeline([Command(['b'], [])], False))) - - self.assertEqual(self.parse('a && b || c'), - Seq(Seq(Pipeline([Command(['a'], [])], False), - '&&', - Pipeline([Command(['b'], [])], False)), - '||', - Pipeline([Command(['c'], [])], False))) - - self.assertEqual(self.parse('a; b'), - Seq(Pipeline([Command(['a'], [])], False), - ';', - Pipeline([Command(['b'], [])], False))) - -if __name__ == '__main__': - unittest.main() - diff --git a/gnu/llvm/utils/lit/tests/unit/TestRunner.py b/gnu/llvm/utils/lit/tests/unit/TestRunner.py deleted file mode 100644 index 89209d80f55..00000000000 --- a/gnu/llvm/utils/lit/tests/unit/TestRunner.py +++ /dev/null @@ -1,172 +0,0 @@ -# RUN: %{python} %s -# -# END. - - -import unittest -import platform -import os.path -import tempfile - -import lit -from lit.TestRunner import ParserKind, IntegratedTestKeywordParser, \ - parseIntegratedTestScript - - -class TestIntegratedTestKeywordParser(unittest.TestCase): - inputTestCase = None - - @staticmethod - def load_keyword_parser_lit_tests(): - """ - Create and load the LIT test suite and test objects used by - TestIntegratedTestKeywordParser - """ - # Create the global config object. - lit_config = lit.LitConfig.LitConfig(progname='lit', - path=[], - quiet=False, - useValgrind=False, - valgrindLeakCheck=False, - singleProcess=False, - valgrindArgs=[], - noExecute=False, - debug=False, - isWindows=( - platform.system() == 'Windows'), - params={}) - TestIntegratedTestKeywordParser.litConfig = lit_config - # Perform test discovery. - test_path = os.path.dirname(os.path.dirname(__file__)) - inputs = [os.path.join(test_path, 'Inputs/testrunner-custom-parsers/')] - assert os.path.isdir(inputs[0]) - run = lit.run.Run(lit_config, - lit.discovery.find_tests_for_inputs(lit_config, inputs)) - assert len(run.tests) == 1 and "there should only be one test" - TestIntegratedTestKeywordParser.inputTestCase = run.tests[0] - - @staticmethod - def make_parsers(): - def custom_parse(line_number, line, output): - if output is None: - output = [] - output += [part for part in line.split(' ') if part.strip()] - return output - - return [ - IntegratedTestKeywordParser("MY_TAG.", ParserKind.TAG), - IntegratedTestKeywordParser("MY_DNE_TAG.", ParserKind.TAG), - IntegratedTestKeywordParser("MY_LIST:", ParserKind.LIST), - IntegratedTestKeywordParser("MY_RUN:", ParserKind.COMMAND), - IntegratedTestKeywordParser("MY_CUSTOM:", ParserKind.CUSTOM, - custom_parse) - ] - - @staticmethod - def get_parser(parser_list, keyword): - for p in parser_list: - if p.keyword == keyword: - return p - assert False and "parser not found" - - @staticmethod - def parse_test(parser_list): - script = parseIntegratedTestScript( - TestIntegratedTestKeywordParser.inputTestCase, - additional_parsers=parser_list, require_script=False) - assert not isinstance(script, lit.Test.Result) - assert isinstance(script, list) - assert len(script) == 0 - - def test_tags(self): - parsers = self.make_parsers() - self.parse_test(parsers) - tag_parser = self.get_parser(parsers, 'MY_TAG.') - dne_tag_parser = self.get_parser(parsers, 'MY_DNE_TAG.') - self.assertTrue(tag_parser.getValue()) - self.assertFalse(dne_tag_parser.getValue()) - - def test_lists(self): - parsers = self.make_parsers() - self.parse_test(parsers) - list_parser = self.get_parser(parsers, 'MY_LIST:') - self.assertEqual(list_parser.getValue(), - ['one', 'two', 'three', 'four']) - - def test_commands(self): - parsers = self.make_parsers() - self.parse_test(parsers) - cmd_parser = self.get_parser(parsers, 'MY_RUN:') - value = cmd_parser.getValue() - self.assertEqual(len(value), 2) # there are only two run lines - self.assertEqual(value[0].strip(), "%dbg(MY_RUN: at line 4) baz") - self.assertEqual(value[1].strip(), "%dbg(MY_RUN: at line 7) foo bar") - - def test_custom(self): - parsers = self.make_parsers() - self.parse_test(parsers) - custom_parser = self.get_parser(parsers, 'MY_CUSTOM:') - value = custom_parser.getValue() - self.assertEqual(value, ['a', 'b', 'c']) - - def test_bad_keywords(self): - def custom_parse(line_number, line, output): - return output - - try: - IntegratedTestKeywordParser("TAG_NO_SUFFIX", ParserKind.TAG), - self.fail("TAG_NO_SUFFIX failed to raise an exception") - except ValueError as e: - pass - except BaseException as e: - self.fail("TAG_NO_SUFFIX raised the wrong exception: %r" % e) - - try: - IntegratedTestKeywordParser("TAG_WITH_COLON:", ParserKind.TAG), - self.fail("TAG_WITH_COLON: failed to raise an exception") - except ValueError as e: - pass - except BaseException as e: - self.fail("TAG_WITH_COLON: raised the wrong exception: %r" % e) - - try: - IntegratedTestKeywordParser("LIST_WITH_DOT.", ParserKind.LIST), - self.fail("LIST_WITH_DOT. failed to raise an exception") - except ValueError as e: - pass - except BaseException as e: - self.fail("LIST_WITH_DOT. raised the wrong exception: %r" % e) - - try: - IntegratedTestKeywordParser("CUSTOM_NO_SUFFIX", - ParserKind.CUSTOM, custom_parse), - self.fail("CUSTOM_NO_SUFFIX failed to raise an exception") - except ValueError as e: - pass - except BaseException as e: - self.fail("CUSTOM_NO_SUFFIX raised the wrong exception: %r" % e) - - # Both '.' and ':' are allowed for CUSTOM keywords. - try: - IntegratedTestKeywordParser("CUSTOM_WITH_DOT.", - ParserKind.CUSTOM, custom_parse), - except BaseException as e: - self.fail("CUSTOM_WITH_DOT. raised an exception: %r" % e) - try: - IntegratedTestKeywordParser("CUSTOM_WITH_COLON:", - ParserKind.CUSTOM, custom_parse), - except BaseException as e: - self.fail("CUSTOM_WITH_COLON: raised an exception: %r" % e) - - try: - IntegratedTestKeywordParser("CUSTOM_NO_PARSER:", - ParserKind.CUSTOM), - self.fail("CUSTOM_NO_PARSER: failed to raise an exception") - except ValueError as e: - pass - except BaseException as e: - self.fail("CUSTOM_NO_PARSER: raised the wrong exception: %r" % e) - -if __name__ == '__main__': - TestIntegratedTestKeywordParser.load_keyword_parser_lit_tests() - unittest.main(verbosity=2) diff --git a/gnu/llvm/utils/lit/tests/unittest-adaptor.py b/gnu/llvm/utils/lit/tests/unittest-adaptor.py deleted file mode 100644 index 0848cd22baa..00000000000 --- a/gnu/llvm/utils/lit/tests/unittest-adaptor.py +++ /dev/null @@ -1,18 +0,0 @@ -# Check the lit adaption to run under unittest. -# -# RUN: %{python} %s %{inputs}/unittest-adaptor 2> %t.err -# RUN: FileCheck < %t.err %s -# -# CHECK-DAG: unittest-adaptor :: test-two.txt ... FAIL -# CHECK-DAG: unittest-adaptor :: test-one.txt ... ok - -import unittest -import sys - -import lit -import lit.discovery - -input_path = sys.argv[1] -unittest_suite = lit.discovery.load_test_suite([input_path]) -runner = unittest.TextTestRunner(verbosity=2) -runner.run(unittest_suite) diff --git a/gnu/llvm/utils/lit/tests/usage.py b/gnu/llvm/utils/lit/tests/usage.py deleted file mode 100644 index d168c5eff9e..00000000000 --- a/gnu/llvm/utils/lit/tests/usage.py +++ /dev/null @@ -1,6 +0,0 @@ -# Basic sanity check that usage works. -# -# RUN: %{lit} --help > %t.out -# RUN: FileCheck < %t.out %s -# -# CHECK: usage: lit.py [-h] diff --git a/gnu/llvm/utils/lit/tests/xunit-output.py b/gnu/llvm/utils/lit/tests/xunit-output.py deleted file mode 100644 index 930768e61da..00000000000 --- a/gnu/llvm/utils/lit/tests/xunit-output.py +++ /dev/null @@ -1,16 +0,0 @@ -# REQUIRES: shell - -# Check xunit output -# RUN: rm -rf %t.xunit.xml -# RUN: not %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output -# If xmllint is installed verify that the generated xml is well-formed -# RUN: sh -c 'if command -v xmllint 2>/dev/null; then xmllint --noout %t.xunit.xml; fi' -# RUN: FileCheck < %t.xunit.xml %s - -# CHECK: <?xml version="1.0" encoding="UTF-8" ?> -# CHECK: <testsuites> -# CHECK: <testsuite name="test-data" tests="1" failures="1" skipped="0"> -# CHECK: <testcase classname="test-data.test-data" name="bad&name.ini" time="{{[0-1]}}.{{[0-9]+}}"> -# CHECK-NEXT: <failure ><![CDATA[& < > ]]]]><![CDATA[> &"]]></failure> -# CHECK: </testsuite> -# CHECK: </testsuites> |
