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

Fix bug in Coverage Filter related to relative filepaths #3518

Merged
merged 1 commit into from Sep 25, 2016

Conversation

Projects
None yet
2 participants
@sbacic
Contributor

sbacic commented Sep 15, 2016

This fixes an edge-case bug with regular filepaths (not asterixed wildcards).

And here is the related issue describing the bug in more detail: #3519

@@ -73,7 +73,7 @@ public function whiteList($config)
if (isset($coverage['whitelist']['include'])) {
foreach ($coverage['whitelist']['include'] as $fileOrDir) {
$finder = strpos($fileOrDir, '*') === false
? [$fileOrDir]
? [Configuration::projectDir() . DIRECTORY_SEPARATOR . $fileOrDir]

This comment has been minimized.

@Naktibalda

Naktibalda Sep 15, 2016

Member

I think that this code creates an incorrect path when codeception.yml is included. #3433
@loren-osborn what do you think about it?

@Naktibalda

Naktibalda Sep 15, 2016

Member

I think that this code creates an incorrect path when codeception.yml is included. #3433
@loren-osborn what do you think about it?

@sbacic

This comment has been minimized.

Show comment
Hide comment
@sbacic

sbacic Sep 16, 2016

Contributor

Good news! I've managed to reproduce the bug in a clean environment. Here's the repo: https://github.com/sbacic/cctest

It seems that using chdir() in setUpBeforeClass is causing issues with Codeception's ability to match relative paths in codecept.yml.

Contributor

sbacic commented Sep 16, 2016

Good news! I've managed to reproduce the bug in a clean environment. Here's the repo: https://github.com/sbacic/cctest

It seems that using chdir() in setUpBeforeClass is causing issues with Codeception's ability to match relative paths in codecept.yml.

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Sep 25, 2016

Member

I tested this fix and it works correctly, modified code is consistent with matchWildcardPattern method.

Member

Naktibalda commented Sep 25, 2016

I tested this fix and it works correctly, modified code is consistent with matchWildcardPattern method.

@Naktibalda Naktibalda merged commit 42c4e28 into Codeception:2.2 Sep 25, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@sbacic sbacic deleted the sbacic:coverage-filepath-bugfix branch Sep 26, 2016

@sbacic sbacic restored the sbacic:coverage-filepath-bugfix branch Sep 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment