Skip to content

Commit

Permalink
Merge pull request drupal-media#13 from slashrsm/travis_fix
Browse files Browse the repository at this point in the history
by slashrsm: Try to fix travis builds based on suggestion by @Berdir.
  • Loading branch information
slashrsm committed Aug 18, 2014
2 parents d4fc70c + c988a84 commit bd32d94
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@ script:
- phpcs --report=full --standard=Drupal $TRAVIS_BUILD_DIR/drupal/modules/$MODULE_NAME

# Run the tests
- php $TRAVIS_BUILD_DIR/drupal/core/scripts/run-tests.sh --verbose --color --php `which php` --url http://127.0.0.1:8080 "$MODULE_TEST_GROUP" | tee /tmp/test.txt
- TEST_EXIT=${PIPESTATUS[0]}
- echo $TEST_EXIT
- php $TRAVIS_BUILD_DIR/drupal/core/scripts/run-tests.sh --verbose --color --php `which php` --url http://127.0.0.1:8080 "$MODULE_TEST_GROUP" | tee /tmp/test.txt; TEST_EXIT=${PIPESTATUS[0]}; echo $TEST_EXIT
# 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)$?
- echo $TEST_OUTPUT
- TEST_OUTPUT=$(! egrep -i "([0-9]+ fails)|(PHP Fatal error)|([0-9]+ exceptions)" /tmp/test.txt > /dev/null)$?; echo $TEST_OUTPUT
# Exit the build
- if [ $TEST_EXIT -eq 0 ] && [ $TEST_OUTPUT -eq 0 ]; then exit 0; else exit 1; fi

0 comments on commit bd32d94

Please sign in to comment.