Skip to content
Extraits de code Groupes Projets
travis.sh 1,68 ko
Newer Older
  • Learn to ignore specific revisions
  • Fabian Becker's avatar
    Fabian Becker a validé
    #!/bin/bash
    
    
    if [ `phpunit --group __nogroup__ | grep "No tests executed" | wc -l` -ne 1 ]
    
    Fabian Becker's avatar
    Fabian Becker a validé
    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: <====="
    
    mattab's avatar
    mattab a validé
        phpunit --group __nogroup__ --testdox | grep "[x]"
    
    fi
    
    if [ -n "$TEST_SUITE" ]
    then
        if [ "$TEST_SUITE" = "JavascriptTests" ]
    
            touch ../javascript/enable_sqlite
            phantomjs ../javascript/testrunner.js
        elif [ "$TEST_SUITE" = "UITests" ]
        then
    
            if [ -n "$PLUGIN_NAME" ]
            then
    
                artifacts_folder="ui-tests.master.$PLUGIN_NAME"
    
                artifacts_folder="ui-tests.master"
    
            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 ""
    
                fixture=${PLUGIN_NAME:-OmniFixture}
    
                phantomjs ../lib/screenshot-testing/run-tests.js --use-github-expected --fixture=$fixture $PLUGIN_NAME
    
            else
                phantomjs ../lib/screenshot-testing/run-tests.js --store-in-ui-tests-repo --use-github-expected
    
            if [ -n "$PLUGIN_NAME" ]
            then
                phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors --group $PLUGIN_NAME
            else
                phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors
            fi
    
    else
        phpunit --configuration phpunit.xml --coverage-text --colors