Skip to content

Commit

Permalink
refs #4225 run js tests in a separate group and other after each phpu…
Browse files Browse the repository at this point in the history
…nit test
  • Loading branch information
tsteur committed Nov 25, 2013
1 parent 9d61e7f commit 71bae47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,7 @@ env:
- TEST_SUITE=IntegrationTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=CoreTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=JsTests MYSQL_ADAPTER=PDO_MYSQL
- TEST_SUITE=IntegrationTests MYSQL_ADAPTER=MYSQLI
global:
- secure: "AMhZmPZx4SUcuZRBzGHlQPxzM4D8FvFB3UThDa52gbi9KIBrwcumzV2VGi6B\n5fgjwtB4XTE1In7qhY2HMikPWBmWYYOQ5QcMPJsqqHt4iMmahx8WKzne6NOk\nNpqAuje/fulNGeP2LJZi0nrub3Fh4VwXaOvpNloKNQN/2JuqPtM="
Expand All @@ -23,6 +24,10 @@ matrix:
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=MYSQLI
- php: 5.5
env: TEST_SUITE=IntegrationTests MYSQL_ADAPTER=MYSQLI
- php: 5.4
env: TEST_SUITE=JsTests MYSQL_ADAPTER=PDO_MYSQL
- php: 5.5
env: TEST_SUITE=JsTests MYSQL_ADAPTER=PDO_MYSQL

script: ./travis.sh

Expand Down
23 changes: 7 additions & 16 deletions tests/PHPUnit/travis.sh
@@ -1,9 +1,5 @@
#!/bin/bash

RESULT_JS=0
RESULT_PHP=0
touch ../javascript/enable_sqlite

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. "
Expand All @@ -13,10 +9,13 @@ then
else
if [ -n "$TEST_SUITE" ]
then
phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors
RESULT_PHP=$?
phantomjs ../javascript/testrunner.js
RESULT_JS=$?
if [ "$TEST_SUITE" = "JsTests" ]
then
touch ../javascript/enable_sqlite
phantomjs ../javascript/testrunner.js
else
phpunit --configuration phpunit.xml --testsuite $TEST_SUITE --colors
fi
else
if [ -n "$TEST_DIR" ]
then
Expand All @@ -29,16 +28,8 @@ else
fi

phpunit --colors $TEST_DIR
RESULT_PHP=$?
else
phpunit --configuration phpunit.xml --coverage-text --colors
RESULT_PHP=$?
fi
fi
fi

if [ 0 == $RESULT_PHP ] && [ 0 == $RESULT_JS ]; then
exit 0;
else
exit 1;
fi

0 comments on commit 71bae47

Please sign in to comment.