Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341941 - EVL Ant task does not honor failOnWarnings
Summary: EVL Ant task does not honor failOnWarnings
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Antonio Garcia-Dominguez CLA
QA Contact:
URL:
Whiteboard: interim
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-05 12:15 EDT by Antonio Garcia-Dominguez CLA
Modified: 2012-08-29 17:35 EDT (History)
1 user (show)

See Also:


Attachments
Patch which fixes the issue (1.74 KB, patch)
2011-04-05 12:15 EDT, Antonio Garcia-Dominguez CLA
dkolovos: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Garcia-Dominguez CLA 2011-04-05 12:15:35 EDT
Created attachment 192574 [details]
Patch which fixes the issue

If an EVL script only reports warnings, failOnErrors is set to true and failOnWarnings is set to false, the build fails, and it shouldn't.

This is because of the following code in EvlTask:

if (errors > 0 || warnings > 0) {
  fail((errors + " error(s) and " + warnings
       + " warning(s) found during validation"), null);
}

As you can see, it always fails: it doesn't tell apart the case when only warnings are reported. I've attached a patch which fixes this issue.
Comment 1 Antonio Garcia-Dominguez CLA 2011-04-05 12:38:16 EDT
Oops, please disregard the new boolean field "warnings". The rest of the code is fine.
Comment 2 Dimitris Kolovos CLA 2011-04-15 07:16:32 EDT
In the patch code, there's a call to fail(message, null). In my version of the code fail() only receives one argument of type String. Have you perhaps also modified the EpsilonTask?
Comment 3 Antonio Garcia-Dominguez CLA 2011-04-15 07:19:50 EDT
That would be me. I need fail to receive the exception as well, so I can put a proper Java stack trace in the XML results of an EUnit test suite.
Comment 4 Dimitris Kolovos CLA 2011-04-15 07:29:46 EDT
OK. I've removed the second argument for now and will leave it to you to integrate the remaining changes when your committer account is active if that's OK.
Comment 5 Antonio Garcia-Dominguez CLA 2011-04-15 07:48:21 EDT
OK. I already did the paperwork: I'm waiting for them to send me the credentials.
Comment 6 Antonio Garcia-Dominguez CLA 2011-05-19 08:50:46 EDT
Integrated after committing the rest of the EUnit code into SVN.
Comment 7 Dimitris Kolovos CLA 2011-07-25 08:17:19 EDT
Fixed in 0.9.1