File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ coverage()
114114 make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=../_${build_path} / host_dmd clean
115115 make -j$N -C src -f posix.mak MODEL=$MODEL HOST_DMD=../_${build_path} / host_dmd ENABLE_COVERAGE= 1
116116
117+ cp $build_path /dmd _${build_path} / host_dmd_cov
118+ make -j1 -C src -f posix.mak MODEL=$MODEL HOST_DMD=../_${build_path} / host_dmd_cov ENABLE_COVERAGE= 1 unittest
117119 make -j1 -C test MODEL=$MODEL ARGS="-O -inline -release" DMD_TEST_COVERAGE=1
118120}
119121
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ECTAGS_FILES = src/*.[chd] src/backend/*.[chd] src/root/*.[chd] src/tk/*.[chd]
55.PHONY : all clean test install auto-tester-build auto-tester-test toolchain-info
66
77all :
8- $(QUIET )$(MAKE ) -C src -f posix.mak
8+ $(QUIET )$(MAKE ) -C src -f posix.mak all
99
1010auto-tester-build : toolchain-info
1111 $(QUIET )$(MAKE ) -C src -f posix.mak auto-tester-build ENABLE_RELEASE=1
2121 $(RM ) tags
2222
2323test :
24+ $(QUIET )$(MAKE ) -C src -f posix.mak unittest
2425 $(QUIET )$(MAKE ) -C test -f Makefile
2526
2627html :
Original file line number Diff line number Diff line change @@ -1082,6 +1082,7 @@ Language changes listed by -transition=id:
10821082 * Returns:
10831083 * Return code of the application
10841084 */
1085+ version (unittest ) {} else
10851086int main ()
10861087{
10871088 import core.memory ;
Original file line number Diff line number Diff line change @@ -461,6 +461,11 @@ $G/dmd: $(DMD_SRCS) $(ROOT_SRCS) $G/newdelete.o $G/backend.a $G/lexer.a $(STRING
461461 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 ) ,$^ )
462462endif
463463
464+ $G/dmd-unittest : $(DMD_SRCS ) $(ROOT_SRCS ) $G/newdelete.o $G/lexer.a $(G_GLUE_OBJS ) $(G_OBJS ) $(STRING_IMPORT_FILES ) $(HOST_DMD_PATH )
465+ CC=$(HOST_CXX ) $(HOST_DMD_RUN ) -of$@ $(MODEL_FLAG ) -vtls -J$G -J../res -L-lstdc++ $(DFLAGS ) -g -unittest -main $(filter-out $(STRING_IMPORT_FILES ) $(HOST_DMD_PATH ) ,$^ )
466+
467+ unittest : $G/dmd-unittest
468+ $<
464469
465470clean :
466471 rm -R $(GENERATED )
You can’t perform that action at this time.
0 commit comments