diff options
author | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-05-30 21:07:27 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-05-30 21:07:27 +0000 |
commit | 71792c741ecb7bbddd04d2bf5e5147d82479304a (patch) | |
tree | 4f45fde4c437fcd81f29ce52aa719b2c8a3e726d /llvm/utils/lit/tests | |
parent | 75e87c3f2a6fe3c922023c2c07b7e6df1d8a5b56 (diff) | |
download | bcm5719-llvm-71792c741ecb7bbddd04d2bf5e5147d82479304a.tar.gz bcm5719-llvm-71792c741ecb7bbddd04d2bf5e5147d82479304a.zip |
Revert r333584: [lit] Report line number for failed RUN command
It breaks test-suite.
llvm-svn: 333592
Diffstat (limited to 'llvm/utils/lit/tests')
15 files changed, 6 insertions, 140 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt deleted file mode 100644 index a359c996660..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt deleted file mode 100644 index b11f0d759fe..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg deleted file mode 100644 index 5e87c729919..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/basic.txt b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/basic.txt deleted file mode 100644 index ba2695431bd..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/line-continuation.txt b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/line-continuation.txt deleted file mode 100644 index 1e00bcb9616..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/lit.local.cfg b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/internal-shell/lit.local.cfg deleted file mode 100644 index b76b7a24c99..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-run-at-line/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/lit.cfg deleted file mode 100644 index f4c7921b732..00000000000 --- a/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/llvm/utils/lit/tests/Inputs/shtest-shell/colon-error.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/colon-error.txt deleted file mode 100644 index 8b84c08ce09..00000000000 --- a/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/llvm/utils/lit/tests/lit.cfg b/llvm/utils/lit/tests/lit.cfg index a5ccc2c067e..75d1b5eac85 100644 --- a/llvm/utils/lit/tests/lit.cfg +++ b/llvm/utils/lit/tests/lit.cfg @@ -71,14 +71,3 @@ for attribute in ('llvm_tools_dir', 'lit_tools_dir'): if directory: path = os.path.pathsep.join((directory, path)) config.environment['PATH'] = path - -# These substitutions are needed only in tests where the external shell is used -# and could be either bash or windows cmd.exe. Substitutions are expected to -# be expanded in double quotes. -isWin32CMDEXE = lit_config.isWindows and not lit_config.getBashPath() -if isWin32CMDEXE: - config.substitutions.append(('%{pdbg0}', "echo '")) - config.substitutions.append(('%{pdbg1}', "' > nul")) -else: - config.substitutions.append(('%{pdbg0}', ": '")) - config.substitutions.append(('%{pdbg1}', "'")) diff --git a/llvm/utils/lit/tests/max-failures.py b/llvm/utils/lit/tests/max-failures.py index ca107bc29b9..1613eee8b5c 100644 --- a/llvm/utils/lit/tests/max-failures.py +++ b/llvm/utils/lit/tests/max-failures.py @@ -8,7 +8,7 @@ # # END. -# CHECK: Failing Tests (27) +# CHECK: Failing Tests (26) # CHECK: Failing Tests (1) # CHECK: Failing Tests (2) # CHECK: error: Setting --max-failures to 0 does not have any effect. diff --git a/llvm/utils/lit/tests/shtest-format.py b/llvm/utils/lit/tests/shtest-format.py index 33ed2fe44d6..94d74e3a920 100644 --- a/llvm/utils/lit/tests/shtest-format.py +++ b/llvm/utils/lit/tests/shtest-format.py @@ -39,7 +39,6 @@ # # 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 diff --git a/llvm/utils/lit/tests/shtest-output-printing.py b/llvm/utils/lit/tests/shtest-output-printing.py index 2344ef20036..2a85cf975c9 100644 --- a/llvm/utils/lit/tests/shtest-output-printing.py +++ b/llvm/utils/lit/tests/shtest-output-printing.py @@ -16,15 +16,12 @@ # # 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: $ "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 diff --git a/llvm/utils/lit/tests/shtest-run-at-line.py b/llvm/utils/lit/tests/shtest-run-at-line.py deleted file mode 100644 index adb7af81812..00000000000 --- a/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: not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out -# RUN: FileCheck --input-file %t.out -Dpdbg0="%{pdbg0}" -Dpdbg1="%{pdbg1}" %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: [[pdbg0]]RUN: at line 4[[pdbg1]] && true -# CHECK-NEXT: [[pdbg0]]RUN: at line 5[[pdbg1]] && false -# CHECK-NEXT: [[pdbg0]]RUN: at line 6[[pdbg1]] && 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: [[pdbg0]]RUN: at line 4[[pdbg1]] && echo 'foo bar' | FileCheck -# CHECK-NEXT: [[pdbg0]]RUN: at line 6[[pdbg1]] && echo 'foo baz' | FileCheck -# CHECK-NEXT: [[pdbg0]]RUN: at line 9[[pdbg1]] && 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/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py index 016d1f6f108..b3d55a0c6a9 100644 --- a/llvm/utils/lit/tests/shtest-shell.py +++ b/llvm/utils/lit/tests/shtest-shell.py @@ -26,14 +26,6 @@ # 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" @@ -161,7 +153,7 @@ # # 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: shell parser error on: 'echo "missing quote' # CHECK: *** # CHECK: FAIL: shtest-shell :: error-2.txt @@ -227,4 +219,4 @@ # 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) +# CHECK: Failing Tests (26) diff --git a/llvm/utils/lit/tests/unit/TestRunner.py b/llvm/utils/lit/tests/unit/TestRunner.py index 4ade359790c..874bf275d4e 100644 --- a/llvm/utils/lit/tests/unit/TestRunner.py +++ b/llvm/utils/lit/tests/unit/TestRunner.py @@ -99,8 +99,8 @@ class TestIntegratedTestKeywordParser(unittest.TestCase): 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") + self.assertEqual(value[0].strip(), 'baz') + self.assertEqual(value[1].strip(), 'foo bar') def test_custom(self): parsers = self.make_parsers() |