diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-10 17:52:37 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-10 17:52:37 +0400 |
commit | e6cc26c642c0bb9b37aa66e614362401c4705821 (patch) | |
tree | 8209763480ddabb093235c67053f158d5588c014 /tests/PHPUnit/travis.sh | |
parent | 312ac10d6a1cc37ba094fe895583254687662289 (diff) |
Created unified system for running tests in travis for Piwik Core and any Piwik plugin. System includes a console command (generate:travis-yml) that generates a .travis.yml file for a plugin or core. The travis file will check in travis if it needs to be updated, and if so it will fail the build and tell the user. If a specific command line option is specified supplying a github user token, the .travis.yml file will be updated within travis automatically.
Notes:
- comments and non-travis sections will be preserved
- includes logic for plugins to test themselves against latest stable version instead of just on master
- the system is primarily controlled by environment variables. developers can change/add variables in .travis.yml and the auto-updating will preserve the changes.
Diffstat (limited to 'tests/PHPUnit/travis.sh')
-rwxr-xr-x | tests/PHPUnit/travis.sh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/PHPUnit/travis.sh b/tests/PHPUnit/travis.sh deleted file mode 100755 index 0c6631b550..0000000000 --- a/tests/PHPUnit/travis.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# for travis_wait function -source travis-helper.sh - -if [ "$TEST_SUITE" != "UITests" ] && [ "$TEST_SUITE" != "AngularJSTests" ] -then - if [ `phpunit --group __nogroup__ | grep "No tests executed" | wc -l` -ne 1 ] - then - echo "=====> There are some tests functions which do not have a @group set. " - echo " Please add the @group phpdoc comment to the following tests: <=====" - phpunit --group __nogroup__ --testdox | grep "[x]" - exit 1 - fi -fi - -if [ -n "$TEST_SUITE" ] -then - echo "Executing tests in test suite $TEST_SUITE..." - - if [ -n "$PLUGIN_NAME" ] - then - echo " [ plugin name = $PLUGIN_NAME ]" - fi - - if [ "$TEST_SUITE" = "AngularJSTests" ] - then - sh ./../angularjs/scripts/travis.sh - elif [ "$TEST_SUITE" = "JavascriptTests" ] - then - touch ../javascript/enable_sqlite - phantomjs ../javascript/testrunner.js - elif [ "$TEST_SUITE" = "UITests" ] - then - if [ -n "$PLUGIN_NAME" ] - then - artifacts_folder="protected/ui-tests.master.$PLUGIN_NAME" - else - artifacts_folder="ui-tests.$TRAVIS_BRANCH" - fi - - echo "" - echo "View UI failures (if any) here http://builds-artifacts.piwik.org/$artifacts_folder/$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 "" - - if [ -n "$PLUGIN_NAME" ] - then - phantomjs ../lib/screenshot-testing/run-tests.js --assume-artifacts --persist-fixture-data --screenshot-repo=$TRAVIS_REPO_SLUG --plugin=$PLUGIN_NAME - else - phantomjs ../lib/screenshot-testing/run-tests.js --store-in-ui-tests-repo --persist-fixture-data --assume-artifacts - fi - else - if [ -n "$PLUGIN_NAME" ] - then - travis_wait phpunit --configuration phpunit.xml --colors --testsuite $TEST_SUITE --group $PLUGIN_NAME - else - travis_wait phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors - fi - fi -else - travis_wait phpunit --configuration phpunit.xml --coverage-text --colors -fi
\ No newline at end of file |