mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
druntime/test/cycles: Don't check abort msg if LINK_SHARED is active
The abort message contains line-trace information when linking shared druntime witch makes the test fail. Carry out the same logic for deprecate since it fallbacks to the abort behavior. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
This commit is contained in:
parent
3b991b10f6
commit
f2bc9ba61e
1 changed files with 9 additions and 3 deletions
|
@ -11,15 +11,21 @@ all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS)))
|
|||
$(ROOT)/cycle_ignore.done: RETCODE=0
|
||||
$(ROOT)/cycle_ignore.done: LINES=0
|
||||
$(ROOT)/cycle_abort.done: RETCODE=1
|
||||
$(ROOT)/cycle_abort.done: LINES=$(if $(findstring $(OS),windows),8,7)
|
||||
# LINK_SHARED causes the abort message to contain trace lines.
|
||||
abort_lines := $(if $(filter windows,$(OS)),8,7)
|
||||
abort_lines := $(if $(LINK_SHARED),,$(abort_lines))
|
||||
$(ROOT)/cycle_abort.done: LINES=$(abort_lines)
|
||||
$(ROOT)/cycle_print.done: RETCODE=0
|
||||
$(ROOT)/cycle_print.done: LINES=6
|
||||
$(ROOT)/cycle_deprecate.done: RETCODE=1
|
||||
$(ROOT)/cycle_deprecate.done: LINES=$(if $(findstring $(OS),windows),9,8)
|
||||
# ditto for deprecate
|
||||
deprecate_lines := $(if $(filter windows,$(OS)),9,8)
|
||||
deprecate_lines := $(if $(LINK_SHARED),,$(deprecate_lines))
|
||||
$(ROOT)/cycle_deprecate.done: LINES=$(deprecate_lines)
|
||||
$(ROOT)/%.done: $(ROOT)/test_cycles$(DOTEXE)
|
||||
@echo Testing $*
|
||||
$(QUIET)$(TIMELIMIT)$(ROOT)/test_cycles --DRT-oncycle=$(patsubst cycle_%.done,%, $(notdir $@)) > $@ 2>&1; test $$? -eq $(RETCODE)
|
||||
test `cat $@ | wc -l` -eq $(LINES)
|
||||
[ -z "$(LINES)" ] || test `cat $@ | wc -l` -eq $(LINES)
|
||||
|
||||
$(ROOT)/test_cycles$(DOTEXE): $(SRC)/*.d
|
||||
$(QUIET)$(DMD) $(DFLAGS) -of$@ $^
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue