Skip to content

Commit 11c53c7

Browse files
committed
posix.mak: Clean up /tmp test directory unconditionally
1 parent 5813fac commit 11c53c7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

posix.mak

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,11 @@ unittest/%.run : $(ROOT)/unittest/test_runner
361361
# For example: "make std/algorithm/mutation.test"
362362
# The mktemp business is needed so .o files don't clash in concurrent unittesting.
363363
%.test : %.d $(LIB)
364-
T=`mktemp -d /tmp/.dmd-run-test.XXXXXX` && \
365-
$(DMD) -od$$T $(DFLAGS) -main -unittest $(LIB) -defaultlib= -debuglib= $(LINKDL) -cov -run $< && \
366-
rm -rf $$T
364+
T=`mktemp -d /tmp/.dmd-run-test.XXXXXX` && \
365+
( \
366+
$(DMD) -od$$T $(DFLAGS) -main -unittest $(LIB) -defaultlib= -debuglib= $(LINKDL) -cov -run $< ; \
367+
RET=$$? ; rm -rf $$T ; exit $$RET \
368+
)
367369

368370
# Target for quickly unittesting all modules and packages within a package,
369371
# transitively. For example: "make std/algorithm.test"

0 commit comments

Comments
 (0)