From 79e9b6d6a13a8634734c85c653b3850427081ea3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 10 Feb 2013 14:17:28 -0800 Subject: [PATCH] mk: Run debuginfo tests by default, but only if gdb is available --- configure | 1 + mk/tests.mk | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 56d40205b5c..4828e59b821 100755 --- a/configure +++ b/configure @@ -394,6 +394,7 @@ probe CFG_PDFLATEX pdflatex probe CFG_XETEX xetex probe CFG_LUATEX luatex probe CFG_NODE nodejs node +probe CFG_GDB gdb if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ] then probe CFG_PAXCTL paxctl /sbin/paxctl diff --git a/mk/tests.mk b/mk/tests.mk index 08a4c1c1718..abe9ba60ecd 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -171,6 +171,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \ check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-crates-exec \ check-stage$(1)-T-$(2)-H-$(3)-bench-exec \ + check-stage$(1)-T-$(2)-H-$(3)-debuginfo-exec \ check-stage$(1)-T-$(2)-H-$(3)-doc-exec \ check-stage$(1)-T-$(2)-H-$(3)-pretty-exec @@ -335,6 +336,10 @@ CTEST_BUILD_BASE_debuginfo = debug-info CTEST_MODE_debuginfo = debug-info CTEST_RUNTOOL_debuginfo = $(CTEST_RUNTOOL) +ifeq ($(CFG_GDB),) +CTEST_DISABLE_debuginfo = "no gdb found" +endif + define DEF_CTEST_VARS # All the per-stage build rules you might want to call from the @@ -357,7 +362,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \ --rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X) \ --aux-base $$(S)src/test/auxiliary/ \ --stage-id stage$(1)-$(2) \ - --rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \ + --rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \ $$(CTEST_TESTARGS) CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS) @@ -386,6 +391,8 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)) +ifeq ($$(CTEST_DISABLE_$(4)),) + $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \ $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3)) @@ -395,6 +402,17 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ --logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \ && touch $$@ +else + +$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ + $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \ + $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3)) + @$$(call E, run $(4): $$<) + @$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4))) + touch $$@ + +endif + endef CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo