From 7d4b9ead5fd6834fc87da43f6f3dfeed834f3a17 Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Wed, 28 Dec 2016 19:26:19 +0100 Subject: [PATCH] disable xdebug for frameworktest, print error output as it comes, and unshallow master branch for framework test --- .travis.yml | 7 ++++--- framework-test.php | 17 +++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index d65bbbc..aa331f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,8 @@ script: # run framework tests when enabled - if [[ "${TEST_FRAMEWORK}" != "" ]]; then - if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then + if [[ "${TRAVIS_PULL_REQUEST}" = false ]]; then + git fetch --unshallow; php framework-test.php dev-${TRAVIS_BRANCH} && echo "Framework integration OK"; elif [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]]; then php framework-test.php dev-${TRAVIS_PULL_REQUEST_BRANCH} && echo "Framework integration OK"; @@ -65,6 +66,6 @@ matrix: - php: 5.6 env: PHPCS=true WITH_XDEBUG=false - php: 5.6 - env: TEST_FRAMEWORK=true RUN_PHPUNIT="false" + env: TEST_FRAMEWORK=true WITH_XDEBUG=false RUN_PHPUNIT="false" - php: 7.1 - env: TEST_FRAMEWORK=true RUN_PHPUNIT="false" + env: TEST_FRAMEWORK=true WITH_XDEBUG=false RUN_PHPUNIT="false" diff --git a/framework-test.php b/framework-test.php index 4545922..0806ad4 100644 --- a/framework-test.php +++ b/framework-test.php @@ -52,7 +52,6 @@ function runFrameworkTest($sdkTarget, $testFramework, $testFrameworkVersion) $framework = "{$testFramework} {$testFrameworkVersion}"; - global $outputLog; $composer = <<&1', $output, $returnCode); if ($returnCode !== 0) { $outputLog .= "###################### Failure: Installing framework {$framework} ###################### \n\n" . implode("\n", $output); @@ -89,7 +90,10 @@ function runFrameworkTest($sdkTarget, $testFramework, $testFrameworkVersion) cleanup(); $ok = $returnCode === 0; - echo "Testing {$framework} - " . ($ok ? 'pass' : 'FAIL') . PHP_EOL; + echo "Testing {$framework} with target {$sdkTarget}: " . ($ok ? 'pass' : 'FAIL') . PHP_EOL; + if (!$ok) { + echo $outputLog . PHP_EOL; + } return $ok; } @@ -113,14 +117,7 @@ function build($sdkTarget, array $builds) { $ok = $ok && $result; } - if (!$ok) { - global $outputLog; - echo "\nOutput log: \n\n"; - echo $outputLog . PHP_EOL; - exit(-1); - } - - exit(0); + exit($ok ? 0 : -1); } build($sdkTarget, $builds);