[ 
https://issues.apache.org/jira/browse/SOLR-8446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gregory Chanan updated SOLR-8446:
---------------------------------
    Attachment: SOLR-8446.patch

Here's a trivial patch that makes failonerror configurable for the top-level 
"test" task.

This works for the use case above but depending on what you want to happen, you 
need to understand the ant structure a bit.  For example:
1) If the test task fails, no test report will be generated.  So you may have 
to specify -Dtests.ifNoTests=ignore as well or the task will still fail.  If 
all the lucene tests pass and the solr tests fail (or visa versa), the task 
will succeed even without specifying -Dtests.ifNoTests=ignore because the 
passing subdir will generate the report.
2) This setting affects the entire task, so calling "ant test" can pass even if 
say, compilation is broken.  You may want to specify something like "ant 
compile compile-test test" or similar to avoid this.

> Allow failonerror to be configured for unit tests
> -------------------------------------------------
>
>                 Key: SOLR-8446
>                 URL: https://issues.apache.org/jira/browse/SOLR-8446
>             Project: Solr
>          Issue Type: Improvement
>          Components: Tests
>            Reporter: Gregory Chanan
>            Assignee: Gregory Chanan
>         Attachments: SOLR-8446.patch
>
>
> Currently, failonerror is hard coded to false for the "test" task at the top 
> level scope.  For jenkins runs, it would be useful to be able to configure 
> this because:
> 1) unit tests runs are flaky
> 2) jenkins can detect test failures even if the the test task itself passes 
> and mark the build yellow (which happens if failonerror is true)
> Therefore, this allows some nicer visualization of the jenkins history, i.e.:
> green if everything is good
> yellow if unit tests are failing (most likely flaky)
> red if compile / precommit, etc are broken



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to