llvm-project/llvm/utils/lit/tests/shtest-pushd-popd.py
Madhur Amilkanthwar 0b7ae41b23
[LIT] Print discovered tests and percentages (#66057) (#69831)
This patch adds "nice-to-have" feature in lit.
it prints the total number of discovered tests at the beginning. It is
covenient to see the total number of tests and avoid scrolling up to the
beginning of log.

Further, this patch also prints %ge of tests.

This patch fixes tests pointed by previous attempt of landing this
patch.

Reviewed By: RoboTux, jdenny-ornl

Co-authored-by: Madhur A <madhura@nvidia.com>
2023-10-22 09:22:25 +05:30

26 lines
713 B
Python

# Check the pushd and popd commands
# RUN: not %{lit} -a -v %{inputs}/shtest-pushd-popd \
# RUN: | FileCheck -match-full-lines %s
#
# END.
# CHECK: -- Testing: 4 tests{{.*}}
# CHECK: FAIL: shtest-pushd-popd :: popd-args.txt ({{[^)]*}})
# CHECK: popd invalid
# CHECK: # | 'popd' does not support arguments
# CHECK: FAIL: shtest-pushd-popd :: popd-no-stack.txt ({{[^)]*}})
# CHECK: popd
# CHECK: # | popd: directory stack empty
# CHECK: FAIL: shtest-pushd-popd :: pushd-too-many-args.txt ({{[^)]*}})
# CHECK: pushd a b
# CHECK: # | 'pushd' supports only one argument
# CHECK: Total Discovered Tests: 4
# CHECK: Passed: 1 {{\([0-9]*\.[0-9]*%\)}}
# CHECK: Failed: 3 {{\([0-9]*\.[0-9]*%\)}}
# CHECK-NOT: {{.}}