mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 18:03:54 +00:00
Run tests in their own subdirectory
This way tests can run in parallel without stepping on each other's temporary work files. If a test passes the directory is removed completely; if a test fails only empty directories are removed. This permits inspection of the failed test's left behind state. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
7b6e8067ec
commit
c18626eef6
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
/apidocs
|
/apidocs
|
||||||
/src/git/config.h
|
/src/git/config.h
|
||||||
|
/trash-*.exe
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
*.exe
|
*.exe
|
||||||
|
8
Makefile
8
Makefile
@ -28,6 +28,7 @@ clean:
|
|||||||
rm -f $(GIT_LIB)
|
rm -f $(GIT_LIB)
|
||||||
rm -f src/*.o
|
rm -f src/*.o
|
||||||
rm -f tests/*.o tests/*.exe tests/*.toc
|
rm -f tests/*.o tests/*.exe tests/*.toc
|
||||||
|
rm -rf trash-*.exe
|
||||||
rm -f src/git/config.h
|
rm -f src/git/config.h
|
||||||
rm -rf apidocs
|
rm -rf apidocs
|
||||||
|
|
||||||
@ -81,7 +82,12 @@ $(TEST_EXE): tests/%.exe: tests/%.o tests/%_main.o
|
|||||||
$(T_LIB) -L. -lgit2
|
$(T_LIB) -L. -lgit2
|
||||||
|
|
||||||
$(TEST_RUN): tests/%.run: tests/%.exe
|
$(TEST_RUN): tests/%.run: tests/%.exe
|
||||||
@$<
|
@t=trash-$(<F) && \
|
||||||
|
mkdir $$t && \
|
||||||
|
if (cd $$t && ../$<); \
|
||||||
|
then rm -rf $$t; \
|
||||||
|
else rmdir $$t; exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
Loading…
Reference in New Issue
Block a user