[GitHub] [maven-surefire] Tibor17 commented on pull request #400: [SUREFIRE-1964] Support for method filtering on excludesFile and includesFile
Tibor17 commented on pull request #400: URL: https://github.com/apache/maven-surefire/pull/400#issuecomment-1011657874 @imonteroperez @slawekjaranowski Pls let a have a look into #440 as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] Tibor17 commented on pull request #400: [SUREFIRE-1964] Support for method filtering on excludesFile and includesFile
Tibor17 commented on pull request #400: URL: https://github.com/apache/maven-surefire/pull/400#issuecomment-1010198845 @imonteroperez I did not mean to put the change on this branch. Here are too many and unnecessary changes. The fix should be quite simple. The lists are merged in those two methods we know and no other parts of the code should be modified. Pls try to modify the methods `getIncludeList` and `getExcludeList` on the master. There is no reason why it should not work with minimum change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] Tibor17 commented on pull request #400: [SUREFIRE-1964] Support for method filtering on excludesFile and includesFile
Tibor17 commented on pull request #400: URL: https://github.com/apache/maven-surefire/pull/400#issuecomment-1003142907 @imonteroperez @slawekjaranowski @olamy The includes|excludes, includesFile|excludesFile end up within the TestListResolver. There is no need to modify the implementation of Provider, TestListResolver and other stuff. All we could do is to compromise the sanity check `Method filter prohibited in includes|excludes|includesFile|excludesFile parameter`. Below you can see the original method for includesFile. And then the sanity check is shifted in the modified code, this is my proposal. ``` private List getIncludeList() throws MojoFailureException { List includes = null; if ( isSpecificTestSpecified() ) { includes = new ArrayList<>(); addAll( includes, split( getTest(), "," ) ); } else { if ( getIncludesFile() != null ) { includes = readListFromFile( getIncludesFile() ); } if ( includes == null ) { includes = getIncludes(); } else { maybeAppendList( includes, getIncludes() ); } checkMethodFilterInIncludesExcludes( includes ); if ( includes == null || includes.isEmpty() ) { includes = asList( getDefaultIncludes() ); } } return filterNulls( includes ); } ``` changed to ``` private List getIncludeList() throws MojoFailureException { List includes = null; if ( isSpecificTestSpecified() ) { includes = new ArrayList<>(); addAll( includes, split( getTest(), "," ) ); } else { includes = getIncludes(); checkMethodFilterInIncludesExcludes( includes ); if ( getIncludesFile() != null ) { includes = readListFromFile( getIncludesFile() ); } if ( includes == null || includes.isEmpty() ) { includes = asList( getDefaultIncludes() ); } } return filterNulls( includes ); } ``` Similar with the excludesFile. @imonteroperez Would this help you? Of course we do not know the IT results yet. They may fail.., not sure! Of course the JavaDoc of both parameters should say that the pattern allows using #method, and the site documentation too. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [maven-surefire] Tibor17 commented on pull request #400: [SUREFIRE-1964] Support for method filtering on excludesFile and includesFile
Tibor17 commented on pull request #400: URL: https://github.com/apache/maven-surefire/pull/400#issuecomment-1001225444 @imonteroperez We already discussed this feature request with @olamy in ASF. This feature bring chaos to the meaning of the config parameter and a duplicate to inclusion filter which have the space for the method filtering. Naturally, `includesFile` cannot be about filtering methods. Instead of those parameters pls use `*Test#test*One+testTwo?`. Why you do not use the config parameter `test`? Do you want to override or merge this parameter with system property `test`? TestListResolver -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org