Skip to content

Commit 79936af

Browse files
authored
Merge pull request #297 from WebDrake/test-with-ldmd2
Use multiple different test compilers when invoking rdmd_test from Travis CI
2 parents c56a2c6 + cdd576d commit 79936af

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

posix.mak

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ DRUNTIME_PATH = ../druntime
66
PHOBOS_PATH = ../phobos
77
DUB=dub
88

9+
RDMD_TEST_COMPILERS = $(abspath $(DMD))
10+
11+
VERBOSE_RDMD_TEST=0
12+
13+
ifeq ($(VERBOSE_RDMD_TEST), 1)
14+
override VERBOSE_RDMD_TEST_FLAGS:=-v
15+
endif
16+
917
WITH_DOC = no
1018
DOC = ../dlang.org
1119

@@ -110,7 +118,9 @@ test_tests_extractor: $(ROOT)/tests_extractor
110118
$< -i ./test/tests_extractor/iteration.d | diff - ./test/tests_extractor/iteration.d.ext
111119

112120
test_rdmd: $(ROOT)/rdmd_test $(ROOT)/rdmd
113-
$< --compiler=$(abspath $(DMD)) -m$(MODEL)
121+
$< --compiler=$(abspath $(DMD)) -m$(MODEL) \
122+
--test-compilers=$(RDMD_TEST_COMPILERS) \
123+
$(VERBOSE_RDMD_TEST_FLAGS)
114124
$(DMD) $(DFLAGS) -unittest -main -run rdmd.d
115125

116126
test: test_tests_extractor test_rdmd

travis.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@
22

33
set -uexo pipefail
44

5-
make -f posix.mak all DMD="$(which $DMD)"
6-
make -f posix.mak test DMD="$(which $DMD)"
5+
~/dlang/install.sh install ldc
6+
7+
~/dlang/install.sh list
8+
9+
LDMD2=$(find ~/dlang -type f -name "ldmd2")
10+
11+
make -f posix.mak all DMD=$(which dmd)
12+
make -f posix.mak test DMD=$(which dmd) \
13+
RDMD_TEST_COMPILERS=dmd,$LDMD2 \
14+
VERBOSE_RDMD_TEST=1

0 commit comments

Comments
 (0)