Skip to content

Commit ab34732

Browse files
committed
Run dmd internal unittests on CIs
1 parent e07c3de commit ab34732

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

posix.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ clean:
2121
$(RM) tags
2222

2323
test:
24+
$(QUIET)$(MAKE) -C src -f posix.mak test
2425
$(QUIET)$(MAKE) -C test -f Makefile
2526

2627
html:

src/ddmd/mars.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,7 @@ Language changes listed by -transition=id:
16921692
* Returns:
16931693
* Return code of the application
16941694
*/
1695+
version(unittest) {} else
16951696
int main()
16961697
{
16971698
import core.memory;

src/posix.mak

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ DEPS = $(patsubst %.o,%.deps,$(DMD_OBJS) $(GLUE_OBJS) $(BACK_OBJS))
344344

345345
all: dmd
346346

347-
auto-tester-build: dmd checkwhitespace $G/dmd_frontend
347+
auto-tester-build: dmd checkwhitespace $G/dmd_frontend test
348348
.PHONY: auto-tester-build
349349

350350
toolchain-info:
@@ -392,6 +392,11 @@ $G/dmd: $(DMD_SRCS) $(ROOT_SRCS) $G/newdelete.o $G/backend.a $G/lexer.a $(STRING
392392
CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J$G -J../res -L-lstdc++ $(DFLAGS) $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH) $(LEXER_ROOT),$^)
393393
endif
394394

395+
$G/dmd-unittest: $(DMD_SRCS) $(ROOT_SRCS) $G/newdelete.o $G/lexer.a $(G_GLUE_OBJS) $(G_OBJS) $(STRING_IMPORT_FILES) $(HOST_DMD_PATH)
396+
CC=$(HOST_CXX) $(HOST_DMD_RUN) -of$@ $(MODEL_FLAG) -vtls -J$G -J../res -L-lstdc++ $(DFLAGS) -unittest -main $(filter-out $(STRING_IMPORT_FILES) $(HOST_DMD_PATH),$^)
397+
398+
test: $G/dmd-unittest
399+
$<
395400

396401
clean:
397402
rm -R $(GENERATED)

travis.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ test() {
6161

6262
# test dmd
6363
test_dmd() {
64+
make -j$N -C src -f posix.mak MODEL=$MODEL test
6465
# test fewer compiler argument permutations for PRs to reduce CI load
6566
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
6667
make -j$N -C test MODEL=$MODEL # all ARGS by default

0 commit comments

Comments
 (0)