Skip to content

Commit 024a049

Browse files
committed
add test rules
1 parent b0f372d commit 024a049

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11

2+
.PHONY: sdist
23
sdist: html
34
python setup.py sdist
45

6+
.PHONY: html
57
html:
68
rm -rf virtualenvwrapper/docs
79
(cd docs && $(MAKE) html)
810
cp -r docs/build/html virtualenvwrapper/docs
11+
12+
TEST_SCRIPTS=$(wildcard tests/test*.sh)
13+
14+
.PHONY: test test-bash test-sh test-zsh test-loop
15+
test: test-bash test-sh test-zsh
16+
17+
test-bash:
18+
TEST_SHELL=bash $(MAKE) test-loop
19+
20+
test-sh:
21+
TEST_SHELL=sh $(MAKE) test-loop
22+
23+
test-zsh:
24+
TEST_SHELL="zsh -o shwordsplit" $(MAKE) test-loop
25+
26+
test-loop:
27+
@for test_script in $(wildcard tests/test*.sh) ; do \
28+
echo '********************************************************************************' ; \
29+
echo "Running $$test_script with $(TEST_SHELL)" ; \
30+
SHUNIT_PARENT=$$test_script $(TEST_SHELL) $$test_script ; \
31+
echo ; \
32+
done

0 commit comments

Comments
 (0)