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

Commit

Permalink
Merge pull request #1390 from schveiguy/fixprofile
Browse files Browse the repository at this point in the history
Fix tests for druntime so debug and release tests do not conflict if run in parallel
  • Loading branch information
DmitryOlshansky committed Sep 21, 2015
2 parents cd6b290 + 2f89ccb commit 60ecf0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
6 changes: 3 additions & 3 deletions test/exceptions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ $(ROOT)/unittest_assert.done: $(ROOT)/unittest_assert

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

$(ROOT)/unittest_assert: DFLAGS+=-unittest
Expand Down
27 changes: 6 additions & 21 deletions test/profile/Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
# set from top makefile
OS:=
MODEL:=
DMD:=
DRUNTIME:=
DRUNTIMESO:=
QUIET:=
LINKDL:=

SRC:=src
ROOT:=./obj/$(OS)/$(MODEL)
TESTS:=$(addprefix $(ROOT)/,$(addsuffix .done,profile profilegc both))
include ../common.mak

TESTS:=profile profilegc both

DIFF:=diff
GREP:=grep

ifneq (default,$(MODEL))
MODEL_FLAG:=-m$(MODEL)
endif
CFLAGS:=$(MODEL_FLAG) -Wall
DFLAGS:=$(MODEL_FLAG) -w -I../../src -I../../import -I$(SRC) -L$(DRUNTIME) -defaultlib= -debuglib=

.PHONY: all clean
all: $(TESTS)
all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS)))

$(ROOT)/profile.done: DFLAGS+=-profile
$(ROOT)/profile.done: $(ROOT)/%.done: $(ROOT)/%
Expand All @@ -46,7 +31,7 @@ $(ROOT)/both.done: $(ROOT)/%.done: $(ROOT)/%
@echo Testing $*
@rm -f $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log
$(QUIET)$(ROOT)/$* $(ROOT)/both.log $(ROOT)/both.def $(ROOT)/bothgc.log
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/mytrace.log
$(QUIET)$(GREP) -q '1 .*_Dmain' $(ROOT)/both.log
$(QUIET)$(GREP) -q '1000 .*both.Num\* both.foo(uint)' $(ROOT)/both.log
$(QUIET)$(DIFF) both.def.exp $(ROOT)/both.def
$(QUIET)$(DIFF) bothgc.log.exp $(ROOT)/bothgc.log
Expand All @@ -56,4 +41,4 @@ $(ROOT)/%: $(SRC)/%.d
$(QUIET)$(DMD) $(DFLAGS) -of$(ROOT)/$* $<

clean:
rm -rf obj *.log *.def
rm -rf $(ROOT) *.log *.def

0 comments on commit 60ecf0c

Please sign in to comment.