Skip to content

Commit 673ddf3

Browse files
authored
Only test druntime exceptions gdb test case (rt_trap_exceptions_drt_gdb) when gdb is available. (#16513)
1 parent cc66e60 commit 673ddf3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

druntime/test/exceptions/Makefile

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
include ../common.mak
22

3+
DIFF:=diff
4+
SED:=sed
5+
GDB:=gdb
6+
37
TESTS=stderr_msg unittest_assert invalid_memory_operation unknown_gc static_dtor \
48
future_message refcounted rt_trap_exceptions_drt catch_in_finally \
59
message_with_null
@@ -9,7 +13,10 @@ ifeq ($(OS)-$(BUILD),linux-debug)
913
LINE_TRACE_DFLAGS:=-L--export-dynamic
1014
endif
1115
ifeq ($(OS),linux)
12-
TESTS+=rt_trap_exceptions_drt_gdb
16+
# Only add this test if gdb is available.
17+
ifneq (, $(shell which $(GDB)))
18+
TESTS+=rt_trap_exceptions_drt_gdb
19+
endif
1320
endif
1421
ifeq ($(OS)-$(BUILD),freebsd-debug)
1522
TESTS+=line_trace line_trace_21656 long_backtrace_trunc cpp_demangle
@@ -31,10 +38,6 @@ ifeq ($(BUILD),debug)
3138
TESTS+=assert_fail
3239
endif
3340

34-
DIFF:=diff
35-
SED:=sed
36-
GDB:=gdb
37-
3841
.PHONY: all clean
3942
all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS)))
4043

0 commit comments

Comments
 (0)