testsuite-ignore-elflint
authorDebian Elfutils Maintainers <debian-gcc@lists.debian.org>
Tue, 12 Mar 2024 10:42:59 +0000 (11:42 +0100)
committerMatthias Klose <doko@debian.org>
Tue, 12 Mar 2024 10:42:59 +0000 (11:42 +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 411e5f288acd30b5e4241b93694d3488870b99da..642e86809a229b46a2f910f77871fd538d4b54ba 100644 (file)
@@ -212,3 +212,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
+}
+