Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion druntime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,17 @@ $(addsuffix /.run,$(filter-out test/shared,$(ADDITIONAL_TESTS))): $(DRUNTIME)
test/shared/.run: $(DRUNTIMESO)
endif

ifeq ($(OS),linux)
# FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now
ifeq (1,$(shell which apk >/dev/null 2>&1 && echo 1))
IS_MUSL := 1
endif
endif

test/%/.run: test/%/Makefile $(DMD)
$(QUIET)$(MAKE) -C test/$* MODEL=$(MODEL) OS=$(OS) DMD=$(abspath $(DMD)) BUILD=$(BUILD) \
DRUNTIME=$(abspath $(DRUNTIME)) DRUNTIMESO=$(abspath $(DRUNTIMESO)) LINKDL=$(LINKDL) \
QUIET=$(QUIET) TIMELIMIT='$(TIMELIMIT)' PIC=$(PIC) SHARED=$(SHARED)
QUIET=$(QUIET) TIMELIMIT='$(TIMELIMIT)' PIC=$(PIC) SHARED=$(SHARED) IS_MUSL=$(IS_MUSL)

test/%/.clean: test/%/Makefile
$(QUIET)$(MAKE) -C test/$* MODEL=$(MODEL) OS=$(OS) BUILD=$(BUILD) clean
Expand Down
1 change: 1 addition & 0 deletions druntime/test/common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ QUIET:=
TIMELIMIT:=
PIC:=
SHARED:=
IS_MUSL:=

# Variables that can be specified by users, with the same meaning as used by GNU make
# $(CC) $(CXX) $(DMD) # the compiler
Expand Down
7 changes: 0 additions & 7 deletions druntime/test/exceptions/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
ifeq ($(OS),linux)
# FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now
ifeq (1,$(shell which apk &>/dev/null && echo 1))
IS_MUSL:=1
endif
endif

TESTS=stderr_msg unittest_assert invalid_memory_operation static_dtor \
future_message refcounted rt_trap_exceptions_drt catch_in_finally \
message_with_null
Expand Down
6 changes: 2 additions & 4 deletions druntime/test/importc_compare/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ TESTS := importc_compare

# FIXME: fails on Alpine v3.21 with conflicting struct declarations in the C headers:
# /usr/include/asm-generic/fcntl.h(195): Error: struct `importc_includes.flock` conflicts with struct `importc_includes.flock` at /usr/include/fcntl.h(24)
ifeq ($(OS),linux)
ifeq (1,$(shell which apk &>/dev/null && echo 1))
TESTS :=
endif
ifeq ($(IS_MUSL),1)
TESTS :=
endif

include ../common.mak
Expand Down
Loading