[ 
https://issues.apache.org/jira/browse/YETUS-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16578476#comment-16578476
 ] 

Allen Wittenauer commented on YETUS-658:
----------------------------------------

On the patch itself, a few nits:

{code}
modules_workers "${repostatus}" unit clean test -fae "${maven_exclude_option}"
{code}

This was probably supposed to be $(maven_exclude_option).  It should be noted 
that empty quotes on a command line (e.g., "") will generate a null shell 
parameter.  So the code needs to get changed to make sure that doesn't happen, 
since it will get passed to maven and maven may throw up on it.

{code}
yetus_add_option "--tests-exclude=<file>" "The test exclude file to load"
{code}

This should probably specify 'unit' in the option and description to 
differentiate it from yetus' test infrastructure.

====

Less nits-based, I've been thinking a lot about this code change.  Something in 
the back of my head kept bugging me... like we were missing something.  It 
finally hit me what it was.  Instead of being solely for 'excluding' tests, 
what if it was just a filter for both including and excluding? Visually:

"run all tests, except these:"

!test1
!test2

"only run these tests:"
test1
test3

You could do a combo, but at least for maven, I'm not sure it makes sense:

!test1
test2
!test3


This way test-patch could execute tests specifically requested when needed as 
well as use the same parameter (but a different provided file, obviously) if 
the user wanted to only run certain tests.  

Code-wise, there wouldn't be much difference and would actually cut down on 
some of it.

Thoughts? 

> Built-in Support For Unit Test Excluding
> ----------------------------------------
>
>                 Key: YETUS-658
>                 URL: https://issues.apache.org/jira/browse/YETUS-658
>             Project: Yetus
>          Issue Type: Improvement
>            Reporter: Jack Bearden
>            Assignee: Jack Bearden
>            Priority: Critical
>         Attachments: YETUS-658.001.patch
>
>
> Been using Yetus for a month and I must say, it's a great product for our 
> Hadoop unit testing pipelines. However, I would like it to have native 
> support for excluding junit tests. Some of the test results just don't have 
> value to us and would like to ignore them.
> I have a patch that adds an argument to testpatch with a path to an exclude 
> file. This file is then parsed into the unit test command in Maven.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to