-
Notifications
You must be signed in to change notification settings - Fork 543
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
[SUREFIRE-1964] Support for method filtering on excludesFile and includesFile #400
[SUREFIRE-1964] Support for method filtering on excludesFile and includesFile #400
Conversation
c0233c9
to
67edb77
Compare
67edb77
to
00f1ba8
Compare
@imonteroperez please rebase and resolve conflicts |
Updated on abfd73f and no conflicts obtained |
Please also squash to one finish commit |
@slawekjaranowski I cannot see any conflicts and btw we can squash when merging.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for new feature should be also updated ...
eg. on page https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html or create another one page.
on plugin params includesFile
, excludesFile
put link to page.
In other case no one will know about it.
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
3d723f5
to
4e33bf1
Compare
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
@imonteroperez |
Hi @Tibor17 I know I can use |
Moving this PR to draft status to achieve some of the feedback provided and to include more testing. |
|
@imonteroperez The includes|excludes, includesFile|excludesFile end up within the TestListResolver. Below you can see the original method for includesFile. And then the sanity check is shifted in the modified code, this is my proposal.
changed to
Similar with the excludesFile. @imonteroperez |
I think this is not going to work because IIUC then is going to be delegated to a FileScanner to evaluate which test classes should be executed without considering the method filtering. See: https://github.com/apache/maven-surefire/blob/master/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/FileScanner.java#L74 where method is |
Applied in 20d880d your proposal with a combination of mine to specify the tests to run based on identifying if there is method filtering applied or not on the |
199184f
to
20d880d
Compare
687be88
to
af199d1
Compare
af199d1
to
37cf5fc
Compare
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
Outdated
Show resolved
Hide resolved
12e509c
to
bc8768b
Compare
code looks ok Please add documentation to Mojo params and to site with examples. |
@imonteroperez |
@imonteroperez |
160b7bb
to
bc8768b
Compare
Closed in favor of #440 |
Highlights
excludesFile
andincludesFile
.mvn test -Dsurefire.excludesFile=/foo/bar/file
and it is using method filtering like:Method filter prohibited in includes|excludes|includesFile|excludesFile parameter
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
SUREFIRE-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean install
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install
).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.