Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 1 | From 6393b0e57872b3ffedf0dbd6784cd29694010878 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Wed, 21 Aug 2019 16:59:01 +0800 |
| 4 | Subject: [PATCH 1/2] testsuite-ignore-elflint |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 6 | Upstream-Status: Pending [from debian] |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 7 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 8 | Rebase to 0.177 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 9 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 11 | --- |
| 12 | tests/run-elflint-self.sh | 2 +- |
| 13 | tests/test-subr.sh | 15 +++++++++++++++ |
| 14 | 2 files changed, 16 insertions(+), 1 deletion(-) |
| 15 | |
| 16 | diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh |
| 17 | index 58fa7d0..85d21a5 100755 |
| 18 | --- a/tests/run-elflint-self.sh |
| 19 | +++ b/tests/run-elflint-self.sh |
| 20 | @@ -18,5 +18,5 @@ |
| 21 | |
| 22 | . $srcdir/test-subr.sh |
| 23 | |
| 24 | -testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld |
| 25 | +testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld |
| 26 | testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld |
| 27 | diff --git a/tests/test-subr.sh b/tests/test-subr.sh |
| 28 | index 09f428d..26f61f1 100644 |
| 29 | --- a/tests/test-subr.sh |
| 30 | +++ b/tests/test-subr.sh |
| 31 | @@ -201,3 +201,18 @@ testrun_on_self_quiet() |
| 32 | # Only exit if something failed |
| 33 | if test $exit_status != 0; then exit $exit_status; fi |
| 34 | } |
| 35 | + |
| 36 | +# Same as testrun_on_self(), but skip on failure. |
| 37 | +testrun_on_self_skip() |
| 38 | +{ |
| 39 | + exit_status=0 |
| 40 | + |
| 41 | + for file in $self_test_files; do |
| 42 | + testrun $* $file \ |
| 43 | + || { echo "*** failure in $* $file"; exit_status=77; } |
| 44 | + done |
| 45 | + |
| 46 | + # Only exit if something failed |
| 47 | + if test $exit_status != 0; then exit $exit_status; fi |
| 48 | +} |
| 49 | + |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 50 | -- |
| 51 | 2.7.4 |
| 52 | |