summaryrefslogtreecommitdiff
path: root/debian/patches/libgo-testsuite.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/libgo-testsuite.diff')
-rw-r--r--debian/patches/libgo-testsuite.diff52
1 files changed, 52 insertions, 0 deletions
diff --git a/debian/patches/libgo-testsuite.diff b/debian/patches/libgo-testsuite.diff
new file mode 100644
index 0000000..34977ce
--- /dev/null
+++ b/debian/patches/libgo-testsuite.diff
@@ -0,0 +1,52 @@
+# DP: Only run the libgo testsuite for flags configured in RUNTESTFLAGS
+
+Index: b/src/libgo/Makefile.am
+===================================================================
+--- a/src/libgo/Makefile.am
++++ b/src/libgo/Makefile.am
+@@ -2387,6 +2387,12 @@ CHECK = \
+ export LD_LIBRARY_PATH; \
+ $(MKDIR_P) $(@D); \
+ rm -f $@-testsum $@-testlog; \
++ run_check=yes; \
++ MULTILIBDIR="$(MULTILIBDIR)"; \
++ case "$$MULTILIBDIR" in /64|/x32) \
++ echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
++ esac; \
++ if test "$$run_check" = "yes"; then \
+ if test "$(USE_DEJAGNU)" = "yes"; then \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ elif test "$(GOBENCH)" != ""; then \
+@@ -2402,6 +2408,7 @@ CHECK = \
+ echo "FAIL: $(@D)" > $@-testsum; \
+ exit 1; \
+ fi; \
++ fi; \
+ fi
+
+ # Build all packages before checking any.
+Index: b/src/libgo/Makefile.in
+===================================================================
+--- a/src/libgo/Makefile.in
++++ b/src/libgo/Makefile.in
+@@ -2394,6 +2394,12 @@ CHECK = \
+ export LD_LIBRARY_PATH; \
+ $(MKDIR_P) $(@D); \
+ rm -f $@-testsum $@-testlog; \
++ run_check=yes; \
++ MULTILIBDIR="$(MULTILIBDIR)"; \
++ case "$$MULTILIBDIR" in /64|/x32) \
++ echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \
++ esac; \
++ if test "$$run_check" = "yes"; then \
+ if test "$(USE_DEJAGNU)" = "yes"; then \
+ $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \
+ elif test "$(GOBENCH)" != ""; then \
+@@ -2409,6 +2415,7 @@ CHECK = \
+ echo "FAIL: $(@D)" > $@-testsum; \
+ exit 1; \
+ fi; \
++ fi; \
+ fi
+
+