Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange phpdbg failures on Travis #622

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
949de0a
Add 2 files and 2 tests in ./src
maks-rafalko Feb 2, 2019
3700b84
Remove C2, but leave C1
maks-rafalko Feb 3, 2019
9289a65
Add back C2, only test file
maks-rafalko Feb 3, 2019
532d099
unset autoloader
maks-rafalko Feb 4, 2019
d1e2386
Revert back unset() in tearDown()
maks-rafalko Feb 4, 2019
f07a382
CS Fixes
maks-rafalko Feb 5, 2019
2489d58
Disable custom e2e tests
maks-rafalko Feb 7, 2019
5d7eef8
Enable back test_it_runs_on_itself
maks-rafalko Feb 7, 2019
26933a0
Enable back test_it_runs_configure_command_if_no_configuration
maks-rafalko Feb 7, 2019
85587a2
Disable test_it_runs_on_itself
maks-rafalko Feb 7, 2019
be9b46d
Disable test_it_runs_configure_command_if_no_configuration, Enable te…
maks-rafalko Feb 7, 2019
aafe786
Enable all custom e2e
maks-rafalko Feb 8, 2019
69ac2bd
Disable test_it_runs_configure_command_if_no_configuration
maks-rafalko Feb 8, 2019
516f287
Enable test_it_runs_configure_command_if_no_configuration, disable te…
maks-rafalko Feb 8, 2019
7cf323b
Enable test_it_runs_configure_command_if_no_configuration, disable e2…
maks-rafalko Feb 8, 2019
def7f37
Disable e2e tests
maks-rafalko Feb 8, 2019
dc1c145
Return back all e2e tests
maks-rafalko Feb 8, 2019
ef7dcbb
Run always one tests among all e2e
maks-rafalko Feb 8, 2019
ba6e5cf
return always "unknown" as a Version
maks-rafalko Feb 8, 2019
bfa0438
Find simple-phpunit with the lower priority. Initialize $version with…
maks-rafalko Feb 9, 2019
74db5fc
Remove hardcoded "unknown"
maks-rafalko Feb 9, 2019
8d5b184
Disable test_it_runs_configure_command_if_no_configuration + new prio…
maks-rafalko Feb 9, 2019
5aa9872
Skip one of the e2e test for phpdbg
maks-rafalko Feb 9, 2019
3e9c691
Skip running infection on itself in PHPUnit for phpdbg
maks-rafalko Feb 9, 2019
23b4d48
Skip all e2e tests on PHPUnit for phpdbg
maks-rafalko Feb 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/C1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* This code is licensed under the BSD 3-Clause License.
*
* Copyright (c) 2017-2019, Maks Rafalko
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

declare(strict_types=1);

namespace Infection;

/**
* @internal
*/
final class C1
{
}
2 changes: 1 addition & 1 deletion src/TestFramework/AbstractTestFrameworkAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function getVersion(): string

$process->mustRun();

$version = null;
$version = 'unknown';

try {
$version = $this->versionParser->parse($process->getOutput());
Expand Down
49 changes: 49 additions & 0 deletions tests/C1Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* This code is licensed under the BSD 3-Clause License.
*
* Copyright (c) 2017-2019, Maks Rafalko
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

declare(strict_types=1);

namespace Infection\Tests;

use PHPUnit\Framework\TestCase;

/**
* @internal
*/
final class C1Test extends TestCase
{
public function test_it(): void
{
$this->assertSame(1, 1);
}
}
49 changes: 49 additions & 0 deletions tests/C2Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* This code is licensed under the BSD 3-Clause License.
*
* Copyright (c) 2017-2019, Maks Rafalko
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

declare(strict_types=1);

namespace Infection\Tests;

use PHPUnit\Framework\TestCase;

/**
* @internal
*/
final class C2Test extends TestCase
{
public function test_it(): void
{
$this->assertSame(1, 1);
}
}
4 changes: 4 additions & 0 deletions tests/Console/E2ETest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ final class E2ETest extends TestCase

protected function setUp(): void
{
if (\PHP_SAPI === 'phpdbg') {
$this->markTestSkipped('Running this test on PHPDBG causes failures on Travis, see https://github.com/infection/infection/pull/622.');
}

// Without overcommit this test fails with `proc_open(): fork failed - Cannot allocate memory`
if (strpos(PHP_OS, 'Linux') === 0 &&
is_readable('/proc/sys/vm/overcommit_memory') &&
Expand Down