testsuite-ignore-elflint
authorDebian Elfutils Maintainers <debian-gcc@lists.debian.org>
Tue, 22 Oct 2024 11:13:50 +0000 (13:13 +0200)
committerMatthias Klose <doko@debian.org>
Tue, 22 Oct 2024 11:13:50 +0000 (13:13 +0200)
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 ea80cbec3bc75fa7448f6610458a56508ed94b93..2bb421af114d8c943d0d1efcc16f499e775e37ae 100644 (file)
@@ -213,3 +213,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
+}
+