Commit e52e5e04 authored by mglaman's avatar mglaman Committed by bojanz

Use run-test.sh runner to add concurrency. (#654)

parent 86790fd9
#!/bin/bash
# @file
# Simple script to run the tests via travis-ci.
set -e $DRUPAL_TI_DEBUG
export ARGS=( $DRUPAL_TI_SIMPLETEST_JS_ARGS )
if [ -n "$DRUPAL_TI_SIMPLETEST_GROUP" ]
then
ARGS=( "${ARGS[@]}" "$DRUPAL_TI_SIMPLETEST_GROUP" )
fi
cd "$DRUPAL_TI_DRUPAL_DIR"
{ php "$DRUPAL_TI_SIMPLETEST_FILE" --php $(which php) "${ARGS[@]}" || echo "1 fails"; } | tee /tmp/simpletest-result.txt
egrep -i "([1-9]+ fail[s]?)|(Fatal error)|([1-9]+ exception[s]?)" /tmp/simpletest-result.txt && exit 1
exit 0
......@@ -50,7 +50,8 @@ env:
- DRUPAL_TI_WEBSERVER_PORT="8080"
# Simpletest specific commandline arguments, the DRUPAL_TI_SIMPLETEST_GROUP is appended at the end.
- DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT --types Simpletest"
- DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 20 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT --types Simpletest,PHPUnit-Unit,PHPUnit-Kernel,PHPUnit-Functional"
- DRUPAL_TI_SIMPLETEST_JS_ARGS="--verbose --color --concurrency 1 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT --types PHPUnit-FunctionalJavascript"
# === Behat specific variables.
# This is relative to $TRAVIS_BUILD_DIR
......@@ -88,7 +89,7 @@ env:
matrix:
# [[[ SELECT ANY OR MORE OPTIONS ]]]
#- DRUPAL_TI_RUNNERS="phpunit"
- DRUPAL_TI_RUNNERS="phpunit-core"
- DRUPAL_TI_RUNNERS="simpletest"
#- DRUPAL_TI_RUNNERS="behat"
#- DRUPAL_TI_RUNNERS="phpunit simpletest behat"
......@@ -123,11 +124,9 @@ before_script:
- drupal-ti before_script
script:
- phpcs --standard=phpcs.xml src -s
- phpcs --standard=phpcs.xml modules -s
- phpcs --standard=phpcs.xml tests -s
- phpcs --standard=phpcs.xml commerce.module
- phpcs --standard=phpcs.xml .
- drupal-ti script
- drupal-ti --include ".travis-simpletest-js.sh"
after_script:
- drupal-ti after_script
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment