testsuite-ignore-elflint
authorDebian Elfutils Maintainers <debian-gcc@lists.debian.org>
Wed, 29 Oct 2025 05:57:58 +0000 (06:57 +0100)
committerMatthias Klose <doko@debian.org>
Wed, 29 Oct 2025 05:57:58 +0000 (06:57 +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 2a956b47de2f8fafea2cc1445275d6f37eea19c2..dd0c5e3698f16fe4588b77e045f0e3c442740d30 100644 (file)
@@ -215,3 +215,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
+}
+