diff --git a/.travis.yml b/.travis.yml index ed20432..87ee7ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,15 +92,16 @@ script: - ls -la $TRAVIS_BUILD_DIR/../drupal/sites/default # Run the tests - - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --php `which php` --url http://localhost "search_api_solr" | tee /tmp/test.txt ; export TEST_EXIT=${PIPESTATUS[0]} ; echo $TEST_EXIT + - export SIMPLETEST_DB=mysql://root:@localhost/drupal + - php core/scripts/run-tests.sh --verbose --color --concurrency 4 --php `which php` --url http://localhost --class "\Drupal\search_api_solr\Tests\IntegrationTest" | tee /tmp/test.txt ; export TEST_EXIT=${PIPESTATUS[0]} ; echo $TEST_EXI # Check if we had fails in the run-tests.sh script # Exit with the inverted value, because if there are no fails found, it will exit with 1 and for us that\ # is a good thing so invert it to 0. Travis has some issues with the exclamation mark in front so we have to fiddle a # bit. # Also make the grep case insensitive and fail on run-tests.sh regular fails as well on fatal errors. - - TEST_OUTPUT=$(! egrep -i "([0-9]+ fails)|(PHP Fatal error)|([0-9]+ exceptions)" /tmp/test.txt > /dev/null)$? - - cd $TRAVIS_BUILD_DIR/../drupal/core - - ./vendor/bin/phpunit --group search_api_solr -c "../modules/search_api_solr/phpunit.xml.travis" --verbose --debug | tee ; export TEST_PHPUNIT=${PIPESTATUS[0]} ; echo $TEST_PHPUNIT + - TEST_OUTPUT=$(! egrep -i "([0-9]+ fails)|(Fatal erro)|([0-9]+ exceptions)" /tmp/test.txt > /dev/null)$? + - cd $TRAVIS_BUILD_DIR/../drupal + - ./vendor/bin/phpunit --group search_api_solr -c "modules/search_api_solr/phpunit.xml.travis" --verbose --debug | tee ; export TEST_PHPUNIT=${PIPESTATUS[0]} ; echo $TEST_PHPUNIT #- ./vendor/bin/phpunit --group search_api_solr -c "../modules/search_api_solr/phpunit.xml.travis" --verbose --debug --coverage-text | tee ; export TEST_PHPUNIT=${PIPESTATUS[0]} ; echo $TEST_PHPUNIT # if the TEST_EXIT status is 0 AND the TEST_OUTPUT status is also 0 it means we succeeded, in all other cases we # failed.