diff options
author | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-04-24 18:43:25 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-04-24 18:43:25 +0000 |
commit | 8a475307bd2fdc1a414d7f0d72c6d1a40e831b3d (patch) | |
tree | c137bd5bc6f7a94466d179043dd3bc1f014d3f5d /llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell | |
parent | 080436fd0f0a14f3b39a25242f4bb6bee8f741af (diff) | |
download | bcm5719-llvm-8a475307bd2fdc1a414d7f0d72c6d1a40e831b3d.tar.gz bcm5719-llvm-8a475307bd2fdc1a414d7f0d72c6d1a40e831b3d.zip |
[lit] Report line number for failed RUN command
When debugging test failures with -vv (or -v in the case of the
internal shell), this makes it easier to locate the RUN line that
failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN
lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines
after concatenation for line continuations.
When reading the generated shell script, this also makes it easier to
locate the RUN line that produced each command.
To support reporting RUN line numbers in the case of the internal
shell, this patch extends the internal shell to support the null
command, ":", except pipelines are not supported.
Reviewed By: asmith, delcypher
Differential Revision: https://reviews.llvm.org/D44598
llvm-svn: 330755
Diffstat (limited to 'llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell')
3 files changed, 16 insertions, 0 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 new file mode 100644 index 00000000000..ba2695431bd --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/basic.txt @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 00000000000..1e00bcb9616 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt @@ -0,0 +1,11 @@ +# 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/external-shell/lit.local.cfg b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg new file mode 100644 index 00000000000..5e87c729919 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg @@ -0,0 +1,2 @@ +import lit.formats +config.test_format = lit.formats.ShTest(execute_external=True) |