testsuite-ignore-elflint
authorKurt Roeckx <kurt@roeckx.be>
Tue, 28 May 2019 18:53:12 +0000 (19:53 +0100)
committerKarsten Merker <merker@debian.org>
Tue, 28 May 2019 18:53:12 +0000 (19:53 +0100)
On many architectures this test fails because binaries/libs produced by
binutils don't pass elflint. However elfutils shouldn't FTBFS because of this.

So we run the tests on all archs to see what breaks, but if it breaks we ignore
the result (exitcode 77 means: this test was skipped).

Gbp-Pq: Name testsuite-ignore-elflint.diff

tests/run-elflint-self.sh
tests/test-subr.sh

index 58fa7d0fb21260d38fdca493e45f2dd6a840e5a5..85d21a562e3167700f8ff33da1694a8987ce4406 100755 (executable)
@@ -18,5 +18,5 @@
 
 . $srcdir/test-subr.sh
 
-testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld
 testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld
index 09f428d1177fbb2e746e9d35c0ee55246f38ca58..26f61f1324ceacb2ce87669a451514e7d6702539 100644 (file)
@@ -201,3 +201,18 @@ testrun_on_self_quiet()
   # Only exit if something failed
   if test $exit_status != 0; then exit $exit_status; fi
 }
+
+# Same as testrun_on_self(), but skip on failure.
+testrun_on_self_skip()
+{
+  exit_status=0
+
+  for file in $self_test_files; do
+      testrun $* $file \
+         || { echo "*** failure in $* $file"; exit_status=77; }
+  done
+
+  # Only exit if something failed
+  if test $exit_status != 0; then exit $exit_status; fi
+}
+