]> source.dussan.org Git - aspectj.git/commitdiff
balancing start/end suite calls
authorwisberg <wisberg>
Sun, 17 Aug 2003 18:47:54 +0000 (18:47 +0000)
committerwisberg <wisberg>
Sun, 17 Aug 2003 18:47:54 +0000 (18:47 +0000)
testing-drivers/src/org/aspectj/testing/drivers/Harness.java

index d1651043b274313fd26ab762434157d9916156a6..94921da3243f655098ccbdb00b8581b23c341d11 100644 (file)
@@ -266,7 +266,6 @@ public class Harness {
                 if ((verboseHarness || skip || (0 < skipList.size()))) {
                     final List curArgs = Arrays.asList(globalOptionVariants[i]);
                                        logln("runMain(" + suiteFile + ", " + curArgs + ")");
-                                       doStartSuite(suiteFile);                        
                     if (verboseHarness) {
                         String format = "yyyy.MM.dd G 'at' hh:mm:ss a zzz";
                         SimpleDateFormat formatter = new SimpleDateFormat (format);
@@ -282,14 +281,19 @@ public class Harness {
                     }
                 }
                 if (!skip) {
-                    final long startTime = System.currentTimeMillis();
-                    RunResult result = run(spec);
-                    if (null != resultList) {
-                        resultList.add(result);
+                    doStartSuite(suiteFile);            
+                    long elapsed = 0;
+                    try {
+                        final long startTime = System.currentTimeMillis();
+                        RunResult result = run(spec);
+                        if (null != resultList) {
+                            resultList.add(result);
+                        }
+                        elapsed = System.currentTimeMillis() - startTime; 
+                        report(result.status, skipList.size(), result.numIncomplete, elapsed);                   
+                    } finally {
+                        doEndSuite(suiteFile,elapsed);
                     }
-                    final long elapsed = System.currentTimeMillis() - startTime; 
-                    doEndSuite(suiteFile,elapsed);
-                    report(result.status, skipList.size(), result.numIncomplete, elapsed);                   
                 }
             }
                }