Skip to content

Commit

Permalink
disable xdebug for frameworktest, and use false symbol, and display o…
Browse files Browse the repository at this point in the history
…utput on fly
  • Loading branch information
afk11 committed Dec 28, 2016
1 parent dbec57d commit c3df540
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ script:

# run framework tests when enabled
- if [[ "${TEST_FRAMEWORK}" != "" ]]; then
if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
php framework-test.php dev-${TRAVIS_BRANCH} && echo "Framework integration OK";
if [[ "${TRAVIS_PULL_REQUEST}" = false ]]; then
php framework-test.php @dev && echo "Framework integration OK";
elif [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]]; then
php framework-test.php dev-${TRAVIS_PULL_REQUEST_BRANCH} && echo "Framework integration OK";
fi
Expand Down Expand Up @@ -65,6 +65,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"
17 changes: 7 additions & 10 deletions framework-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function runFrameworkTest($sdkTarget, $testFramework, $testFrameworkVersion)

$framework = "{$testFramework} {$testFrameworkVersion}";

global $outputLog;
$composer = <<<EOF
{
"name": "integration tester",
Expand All @@ -74,6 +73,8 @@ function runFrameworkTest($sdkTarget, $testFramework, $testFrameworkVersion)

$returnCode = 0;
$output = [];
$outputLog = null;

exec('composer install 2>&1', $output, $returnCode);
if ($returnCode !== 0) {
$outputLog .= "###################### Failure: Installing framework {$framework} ###################### \n\n" . implode("\n", $output);
Expand All @@ -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;
}
Expand All @@ -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);

0 comments on commit c3df540

Please sign in to comment.