Tune the test suite for slow architectures
authorStephane Glondu <steph@glondu.net>
Mon, 27 Feb 2012 19:59:11 +0000 (20:59 +0100)
committerStephane Glondu <steph@glondu.net>
Thu, 19 Apr 2012 06:33:27 +0000 (08:33 +0200)
debian/rules

index 32ebd341598c72d74b925e3d0128e679a05bc227..43d63b5899e1aee384448842d0fb0c070981b3b6 100755 (executable)
@@ -273,6 +273,11 @@ regenerate: debian/control
          | grep -v '^debian/\(patches/\|source/local-\)' \
        > debian/MANIFEST
 
+# Architectures where running the test suite completely makes the
+# whole build last more than one hour on buildds. Originally, because
+# some tests do not even finish on mips.
+SLOW_ARCHITECTURES := hurd-i386 mips mipsel powerpc sparc armel
+
 .PHONY: override_dh_auto_test
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
@@ -291,8 +296,20 @@ ifeq (,$(DEB_TEST_BUILD_PREFIX))
          && $(TESTRULES) build \
          && dh_installdirs \
          && $(TESTRULES) install-stamp \
-         && cp -a debian/tmp/* .. \
-         && cd testsuite \
+         && cp -a debian/tmp/* ..
+# Thread tests seem to hang on buildds, but cannot reproduce elsewhere
+ifneq (,$(findstring kfreebsd,$(DEB_BUILD_ARCH)))
+       rm -rf $(TESTDIR)/ocaml-*/testsuite/tests/lib-threads
+endif
+# Tests that take too much time
+ifneq (,$(filter $(DEB_BUILD_ARCH),$(SLOW_ARCHITECTURES)))
+       for t in \
+         misc/nucleic.ml \
+         misc-unsafe/almabench.ml \
+         misc-unsafe/fft.ml \
+       ; do rm -rf $(TESTDIR)/ocaml-*/testsuite/tests/$$t; done
+endif
+       cd $(TESTDIR)/ocaml-*/testsuite \
          && make all
 endif
 endif