diff --git a/.circleci/config.yml b/.circleci/config.yml index 525e349ff..69e18fe15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: # Using the RAM variation mitigates I/O contention # for database intensive operations. # - image: circleci/mysql:5.7-ram - - image: tkuchiki/delayed-mysql + - image: circleci/mysql:5.7 environment: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_ROOT_PASSWORD: 'pdocker' diff --git a/.travis.yml b/.travis.yml index 6da2031d6..e8a8ebc5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,8 +97,7 @@ install: before_script: - if [[ "${TRAVIS_OS_NAME}" == "linux" && "${_PHP}" == "hhvm" ]]; then curl -sSfL -o ~/.phpenv/versions/hhvm/bin/phpunit https://phar.phpunit.de/phpunit-5.7.phar; fi - mkdir -p build/logs -- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./configure.sh "-c" "-h" "-p" "pass" "-s" "word" "--mig-database" "-y"; fi -- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then .travis/configure.sh; fi + script: - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./test-cake.sh --travis | grep Test; fi after_script: diff --git a/test-cake.sh b/test-cake.sh index 3ac764417..e41c89ad9 100755 --- a/test-cake.sh +++ b/test-cake.sh @@ -2,6 +2,9 @@ source ./Scripts/lib/parsing.sh bootargs="" saved=("$*") +config_args="-c -h -p pass -s word --mig-database -y" +config_work_dir="" +notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password into resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" while [[ "$#" > 0 ]]; do case $1 in --travis ) #; Test values @@ -10,20 +13,14 @@ while [[ "$#" > 0 ]]; do case $1 in export TRAVIS_OS_NAME="osx" export TRAVIS_PHP_VERSION=$(php -v | grep -E "[5-7]\.\\d+\.\\d+" | cut -d " " -f 2 | cut -c 1-3 ) - notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password into resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" - echo -e $notice - source ./configure.sh "--mig-database" "-p" "-t" "-i" "-p=proot" "-t=ptest" - echo -e $notice - source .travis/configure.sh;; + config_args="${config_args}" + config_work_dir=".travis";; --docker ) #; Test values export DB="Mysql" export COLLECT_COVERAGE="false" - notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password into resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" - echo -e $notice - source ./configure.sh "--mig-database" "-p=pdocker" "-t=ptest" "-i" "-p=pdocker" "-t=ptest" - echo -e $notice - source docker/configure.sh;; + config_args="${config_args}" + config_work_dir="docker";; --cov ) export COLLECT_COVERAGE=true;; -[hH]*|--help ) @@ -54,6 +51,10 @@ while [[ "$#" > 0 ]]; do case $1 in esac; shift; done source ./Scripts/bootstrap.sh $bootargs show_password_status "$TEST_DATABASE_USER" "$TEST_DATABASE_PASSWORD" "is running tests" +echo -e $notice +source ./configure.sh "${config_args}" +echo -e $notice +[ ! -z $config_work_dir ] && source "${config_work_dir}/configure.sh" if [[ "$COLLECT_COVERAGE" == "true" ]]; then ./app/Vendor/bin/phpunit --coverage-clover app/build/logs/clover.xml --stop-on-failure -c app/phpunit.xml.dist app/Test/Case/AllTestsTest.php else