diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-15 06:03:17 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-15 06:03:17 +0400 |
commit | 597ba5665a9c2b2d4a5bf0bfacc7476086844443 (patch) | |
tree | 82ff562a18a6e0ab773e044f029364492f5df3bc /tests/PHPUnit/travis.sh | |
parent | 123deeecd26bb581d129d99ee66478c3e5e61406 (diff) |
travis.sh will now check that all tests have been tagged with @group comment. THis will help us detect when new tests are added which wouldn't otherwise be executed by travis
Diffstat (limited to 'tests/PHPUnit/travis.sh')
-rwxr-xr-x | tests/PHPUnit/travis.sh | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/tests/PHPUnit/travis.sh b/tests/PHPUnit/travis.sh index 760fa1bd29..eb4ff6e78b 100755 --- a/tests/PHPUnit/travis.sh +++ b/tests/PHPUnit/travis.sh @@ -1,21 +1,28 @@ #!/bin/bash -if [ -n "$TEST_SUITE" ] +if [ `phpunit --group __nogroup__ | grep "No tests executed" | wc -l` -ne 1 ] then - phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors + echo "There are some tests functions which do not have a @group set. Please add the @group phpdoc comment to these tests:" + phpunit --group __nogroup__ --testdox + exit 1 else - if [ -n "$TEST_DIR" ] - then - if [ "$TEST_DIR" = "UI" ] + if [ -n "$TEST_SUITE" ] then - echo "" - echo "View UI failures (if any) here http://builds-artifacts.piwik.org/ui-tests.master/$TRAVIS_JOB_NUMBER/screenshot-diffs/diffviewer.html." - echo "If the new screenshots are valid, then you can copy them over to tests/PHPUnit/UI/expected-ui-screenshots/." - echo "" - fi + phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors + else + if [ -n "$TEST_DIR" ] + then + if [ "$TEST_DIR" = "UI" ] + then + echo "" + echo "View UI failures (if any) here http://builds-artifacts.piwik.org/ui-tests.master/$TRAVIS_JOB_NUMBER/screenshot-diffs/diffviewer.html." + echo "If the new screenshots are valid, then you can copy them over to tests/PHPUnit/UI/expected-ui-screenshots/." + echo "" + fi - phpunit --colors $TEST_DIR - else - phpunit --configuration phpunit.xml --coverage-text --colors - fi -fi + phpunit --colors $TEST_DIR + else + phpunit --configuration phpunit.xml --coverage-text --colors + fi + fi +fi
\ No newline at end of file |