blob: e6d7948c677092bb9e58e7967b7423ff1ec17fb9 [file] [log] [blame]
Brad Bishopa34c0302019-09-23 22:34:48 -04001From 6393b0e57872b3ffedf0dbd6784cd29694010878 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 16:59:01 +0800
4Subject: [PATCH 1/2] testsuite-ignore-elflint
Brad Bishopc342db32019-05-15 21:57:59 -04005
Brad Bishopa34c0302019-09-23 22:34:48 -04006Upstream-Status: Pending [from debian]
Brad Bishopc342db32019-05-15 21:57:59 -04007
Brad Bishopa34c0302019-09-23 22:34:48 -04008Rebase to 0.177
Brad Bishopc342db32019-05-15 21:57:59 -04009
Brad Bishopa34c0302019-09-23 22:34:48 -040010Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Brad Bishopc342db32019-05-15 21:57:59 -040011---
12 tests/run-elflint-self.sh | 2 +-
13 tests/test-subr.sh | 15 +++++++++++++++
14 2 files changed, 16 insertions(+), 1 deletion(-)
15
16diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh
17index 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
27diff --git a/tests/test-subr.sh b/tests/test-subr.sh
28index 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 Bishopa34c0302019-09-23 22:34:48 -040050--
512.7.4
52