ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gscok...@apache.org
Subject svn commit: r736758 - /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java
Date Thu, 22 Jan 2009 19:50:33 GMT
Author: gscokart
Date: Thu Jan 22 11:50:33 2009
New Revision: 736758

URL: http://svn.apache.org/viewvc?rev=736758&view=rev
Log:
move more code in startSuite and endSuite

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java?rev=736758&r1=736757&r2=736758&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java Thu Jan 22 11:50:33
2009
@@ -224,7 +224,8 @@
     }
 
 
-    private boolean runSuiteSetup(boolean suiteSetUp) {
+    private boolean startSuite(boolean suiteSetUp) {
+        newProject.fireBuildStarted();
         if (suiteSetUp) {
             try {
                 newProject.executeTarget(SUITESETUP);
@@ -276,7 +277,7 @@
         }
     }
 
-    private void runSuiteTearDown(boolean suiteTearDown) {
+    private void endSuite(boolean suiteTearDown, Throwable caught) {
         if (suiteTearDown) {
             try {
                 newProject.executeTarget(SUITETEARDOWN);
@@ -288,6 +289,7 @@
                 fireFailOrError(SUITETEARDOWN, e);
             }
         }
+        newProject.fireBuildFinished(caught);
     }    
     
     /**
@@ -315,11 +317,9 @@
         }
 
         // start test
-        newProject.fireBuildStarted();
-
         Throwable caught = null;
         try {
-            if (!runSuiteSetup(suiteSetUp)) {
+            if (!startSuite(suiteSetUp)) {
                 return;
             }
             Iterator iter = testTargets.iterator();
@@ -333,8 +333,7 @@
         } catch (Throwable e) {
             caught = e;
         } finally {
-            runSuiteTearDown(suiteTearDown);
-            newProject.fireBuildFinished(caught);
+            endSuite(suiteTearDown, caught);            
             newProject = null;
         }
     }



Mime
View raw message