Skip to content

Commit 79e9b6d

Browse files
committed
mk: Run debuginfo tests by default, but only if gdb is available
1 parent 85d7b3c commit 79e9b6d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ probe CFG_PDFLATEX pdflatex
394394
probe CFG_XETEX xetex
395395
probe CFG_LUATEX luatex
396396
probe CFG_NODE nodejs node
397+
probe CFG_GDB gdb
397398
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
398399
then
399400
probe CFG_PAXCTL paxctl /sbin/paxctl

mk/tests.mk

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
171171
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
172172
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
173173
check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
174+
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-exec \
174175
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
175176
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
176177

@@ -335,6 +336,10 @@ CTEST_BUILD_BASE_debuginfo = debug-info
335336
CTEST_MODE_debuginfo = debug-info
336337
CTEST_RUNTOOL_debuginfo = $(CTEST_RUNTOOL)
337338

339+
ifeq ($(CFG_GDB),)
340+
CTEST_DISABLE_debuginfo = "no gdb found"
341+
endif
342+
338343
define DEF_CTEST_VARS
339344

340345
# 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) := \
357362
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X) \
358363
--aux-base $$(S)src/test/auxiliary/ \
359364
--stage-id stage$(1)-$(2) \
360-
--rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \
365+
--rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \
361366
$$(CTEST_TESTARGS)
362367

363368
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
@@ -386,6 +391,8 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
386391

387392
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
388393

394+
ifeq ($$(CTEST_DISABLE_$(4)),)
395+
389396
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
390397
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
391398
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
@@ -395,6 +402,17 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
395402
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
396403
&& touch $$@
397404

405+
else
406+
407+
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
408+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
409+
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
410+
@$$(call E, run $(4): $$<)
411+
@$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4)))
412+
touch $$@
413+
414+
endif
415+
398416
endef
399417

400418
CTEST_NAMES = rpass rpass-full rfail cfail bench perf debuginfo

0 commit comments

Comments
 (0)