diff options
| author | Mark Wielaard <[email protected]> | 2012-08-01 15:39:11 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2012-08-03 23:19:55 +0200 |
| commit | bf707b5170a78b28e5310bbaa079cc226af73378 (patch) | |
| tree | 37b502cef49e8e4fbeb49203a8e6b62b2058fa0e /tests/test-subr.sh | |
| parent | 94e387f693dae334d0b8c713c27a23bd88bc1fc1 (diff) | |
tests: Add run-nm-self.sh and run-readelf-self.sh tests.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/test-subr.sh')
| -rw-r--r-- | tests/test-subr.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/test-subr.sh b/tests/test-subr.sh index 5621cf1b..ff29136f 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -115,8 +115,22 @@ testrun_on_self() exit_status=0 for file in $self_test_files; do - testrun "$@" $file \ - || { echo "*** failure in $@ $file"; exit_status=1; } + testrun $* $file \ + || { echo "*** failure in $* $file"; exit_status=1; } + done + + # Only exit if something failed + if test $exit_status != 0; then exit $exit_status; fi +} + +# Same as above, but redirects stdout to /dev/null +testrun_on_self_quiet() +{ + exit_status=0 + + for file in $self_test_files; do + testrun $* $file > /dev/null \ + || { echo "*** failure in $* $file"; exit_status=1; } done # Only exit if something failed |
