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

Exclude directories - Use AbsolutePath #573

Closed
wants to merge 1 commit into from

Conversation

mgb
Copy link

@mgb mgb commented May 20, 2012

When you run phpunit using a configuration file where the current working directory does not match the configuration's directory, phpunit will fail to exclude paths in testsuites correctly.

Sample configuration:

  <testsuite name="Normal Test Suite">
    <directory>.</directory>
    <exclude>LongTests</exclude>
    <exclude>FlakyTests</exclude>
  </testsuite>

If you run that configuration from any other directory, the . will go to the absolute path of the configuration, while the excludes will only exclude from your current working directory (which won't match the . directory).

@estahn
Copy link

estahn commented Dec 27, 2012

+1 Have this issue as well.

@edorian
Copy link
Contributor

edorian commented Jan 4, 2013

We might very well do this for 3.8. The question that we have to consider is how big the BC impact will be and if it would make sense to have it check relative and then absolute.

Just to state why this isn't a easy merge :)

@blaiz
Copy link

blaiz commented Feb 27, 2013

+1

1 similar comment
@jschlies
Copy link

+1

@whatthejeff
Copy link
Contributor

I've discussed this with @sebastianbergmann and he is okay with the BC break. Expect this to be merged in the next couple of days.

@whatthejeff
Copy link
Contributor

@mgb, 9740a58 should fix your issue. I decided not to merge this PR in favor of a slightly more efficient solution. At any rate, thanks for your help in resolving this issue :)

@ghost
Copy link

ghost commented Dec 6, 2013

So this is not merged? I still have the problem on PHPUnit 3.7.28. What is the solution besides using absolute paths? Also if I specify a directory path and a configuration path, the configuration is ignored.

@srlucas
Copy link

srlucas commented Mar 5, 2014

I am experiencing the same issue.

using absolut paths will cause some issues with CI environments.

@whatthejeff
Copy link
Contributor

@daniphp @srlucas this fix lands in the 4.0 release as it breaks backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants