Skip to content

Commit 7a1f774

Browse files
committed
Convert make test targets to sake
1 parent d097606 commit 7a1f774

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

Makefile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COLON_Z := :Z
77
SELINUX_OPT := $(shell [ $(DOCKER_SELINUX_LABEL) -eq 1 ] && echo "$(COLON_Z)" || echo '' )
88

99
.PHONY: html html-nohighlight sparse assets webdev-build \
10-
bigpage test xtest ctest help run clean-html clean-examples clean-images \
10+
bigpage help run clean-html clean-examples clean-images \
1111
clean-search clean test-links extract-examples push \
1212
docker-image docker-htmlify docker-test docker-xtest docker-ctest docker-testall docker-run
1313

@@ -29,18 +29,6 @@ webdev-build:
2929
bigpage:
3030
pod2onepage --html -v --source-path=./doc --exclude=404.pod6 > html/perl6.html
3131

32-
# Common tests that are run by travis with every commit
33-
test:
34-
if [ "${TEST_JOBS}" != "" ]; then prove -j ${TEST_JOBS} -e perl6 t; else prove -e perl6 t; fi
35-
36-
# Extended tests
37-
xtest:
38-
if [ "${TEST_JOBS}" != "" ]; then prove -j ${TEST_JOBS} -e perl6 t xt; else prove -e perl6 t xt; fi
39-
40-
# Content tests
41-
ctest:
42-
prove --exec perl6 -r t/tabs.t xt/perl-nbsp.t xt/trailing-whitespace.t
43-
4432
help:
4533
@echo "Usage: make [html|html-nohighlight|test|xtest|ctest]"
4634
@echo ""

Sakefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ task 'init-highlights', {
1818
run(<npm install .>);
1919
});
2020
}
21+
22+
sub run-tests(@files) {
23+
run('prove', '-j', %*ENV<TEST_JOBS> || 1, '-e', $*EXECUTABLE-NAME, |@files);
24+
}
25+
26+
task 'test', { run-tests(<t>); }
27+
task 'xtest', { run-tests(<t xt>); }
28+
task 'ctest', { run-tests(<t/07-tabs.t xt/perl-nbsp.t xt/trailing-whitespace.t>); }

0 commit comments

Comments
 (0)