]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - Makefile
Run languages tests using PHPUnit test suites
[github/shaarli/Shaarli.git] / Makefile
index f3065b77ed2658856018372444844dc00e4575da..1d8a73a2e6f8b27a05e36d29225db1db567c1e22 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,8 +124,20 @@ test:
        @echo "-------"
        @echo "PHPUNIT"
        @echo "-------"
-       @mkdir -p sandbox
-       @$(BIN)/phpunit tests
+       @mkdir -p sandbox coverage
+       @$(BIN)/phpunit --coverage-php coverage/main.cov --testsuite unit-tests
+
+locale_test_%:
+       @UT_LOCALE=$*.utf8 \
+               $(BIN)/phpunit \
+               --coverage-php coverage/$(firstword $(subst _, ,$*)).cov \
+               --bootstrap tests/languages/bootstrap.php \
+               --testsuite language-$(firstword $(subst _, ,$*))
+
+all_tests: test locale_test_de_DE locale_test_en_US locale_test_fr_FR
+       @$(BIN)/phpcov merge --html coverage coverage
+       @# --text doesn't work with phpunit 4.* (v5 requires PHP 5.6)
+       @#$(BIN)/phpcov merge --text coverage/txt coverage
 
 ##
 # Custom release archive generation