#1060726 valgrind: Test after build instead of hardcoded arch list

Package:
valgrind
Source:
valgrind
Description:
instrumentation framework for building dynamic analysis tools
Submitter:
Petter Reinholdtsen
Date:
2024-01-13 12:21:04 UTC
Severity:
normal
#1060726#5
Date:
2024-01-13 12:16:18 UTC
From:
To:
Instead of only listing a hardcoded list of supported architectures,
what about duing a simple test to verify that valgrind work after
building, and only upload binary packages on architectures where it
work?

A patch similar to this might work.  It call 'valgrind ls', a very
simple test, to ensure the program do not crash and burn imediately:

diff --git a/debian/control b/debian/control
index 6cefa73..23f8bb0 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Vcs-Browser: https://salsa.debian.org/debian/valgrind
 Homepage: https://www.valgrind.org/

 Package: valgrind
-Architecture: amd64 armel arm64 armhf i386 mips mipsel mips64 mips64el powerpc ppc64 ppc64el s390x
+Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}, libc6-dbg
 Suggests: valgrind-mpi, kcachegrind
 Recommends: valgrind-dbg, gdb
diff --git a/debian/rules b/debian/rules
index c0513a2..c3f222e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@ override_dh_auto_configure:
        dh_auto_configure -- --enable-tls CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

 override_dh_auto_test:
-       : # do nothing for now
+       ./vg-in-place ls

 override_dh_auto_build:
        dh_auto_build

The patch is tested on armel, where it currently fail as expected.