Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 60ecf0c

Browse files
Merge pull request #1390 from schveiguy/fixprofile
Fix tests for druntime so debug and release tests do not conflict if run in parallel
2 parents cd6b290 + 2f89ccb commit 60ecf0c

2 files changed

Lines changed: 9 additions & 24 deletions

File tree

test/exceptions/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ $(ROOT)/unittest_assert.done: $(ROOT)/unittest_assert
2727

2828
$(ROOT)/line_trace.done: $(ROOT)/line_trace
2929
@echo Testing line_trace
30-
@rm -f line_trace.output
31-
$(QUIET)./$(ROOT)/line_trace $(RUN_ARGS) >line_trace.output
32-
$(QUIET)$(SED) "s/\[0x[0-9a-f]*\]/\[ADDR\]/g" line_trace.output | $(DIFF) line_trace.exp -
30+
@rm -f $(ROOT)/line_trace.output
31+
$(QUIET)./$(ROOT)/line_trace $(RUN_ARGS) > $(ROOT)/line_trace.output
32+
$(QUIET)$(SED) "s/\[0x[0-9a-f]*\]/\[ADDR\]/g" $(ROOT)/line_trace.output | $(DIFF) line_trace.exp -
3333
@touch $@
3434

3535
$(ROOT)/unittest_assert: DFLAGS+=-unittest

test/profile/Makefile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1-
# set from top makefile
2-
OS:=
3-
MODEL:=
4-
DMD:=
5-
DRUNTIME:=
6-
DRUNTIMESO:=
7-
QUIET:=
8-
LINKDL:=
9-
10-
SRC:=src
11-
ROOT:=./obj/$(OS)/$(MODEL)
12-
TESTS:=$(addprefix $(ROOT)/,$(addsuffix .done,profile profilegc both))
1+
include ../common.mak
2+
3+
TESTS:=profile profilegc both
134

145
DIFF:=diff
156
GREP:=grep
167

17-
ifneq (default,$(MODEL))
18-
MODEL_FLAG:=-m$(MODEL)
19-
endif
20-
CFLAGS:=$(MODEL_FLAG) -Wall
21-
DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -L$(DRUNTIME) -defaultlib= -debuglib=
22-
238
.PHONY: all clean
24-
all: $(TESTS)
9+
all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS)))
2510

2611
$(ROOT)/profile.done: DFLAGS+=-profile
2712
$(ROOT)/profile.done: $(ROOT)/%.done: $(ROOT)/%
@@ -46,7 +31,7 @@ $(ROOT)/both.done: $(ROOT)/%.done: $(ROOT)/%
4631
@echo Testing $*
4732
@rm -f $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log
4833
$(QUIET)$(ROOT)/$* $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log
49-
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/mytrace.log
34+
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/both.log
5035
$(QUIET)$(GREP) -q '1000 .*both.Num\* both.foo(uint)' $(ROOT)/both.log
5136
$(QUIET)$(DIFF) both.def.exp $(ROOT)/both.def
5237
$(QUIET)$(DIFF) bothgc.log.exp $(ROOT)/bothgc.log
@@ -56,4 +41,4 @@ $(ROOT)/%: $(SRC)/%.d
5641
$(QUIET)$(DMD) $(DFLAGS) -of$(ROOT)/$* $<
5742

5843
clean:
59-
rm -rf obj *.log *.def
44+
rm -rf $(ROOT) *.log *.def

0 commit comments

Comments
 (0)