incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject svn commit: r1402400 - /incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java
Date Fri, 26 Oct 2012 05:49:27 GMT
Author: wanglf
Date: Fri Oct 26 05:49:27 2012
New Revision: 1402400

URL: http://svn.apache.org/viewvc?rev=1402400&view=rev
Log:
initial file provider only when suite file directory exist.

Modified:
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java?rev=1402400&r1=1402399&r2=1402400&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java
(original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/FileProvider.java
Fri Oct 26 05:49:27 2012
@@ -145,39 +145,42 @@ public class FileProvider extends Suite 
 		}
 
 		File reposFile = new File(repos);
-		if (!reposFile.exists())
-			throw new InitializationError(String.format("repos '%s' does not exists ", repos));
-
-		ArrayList<ArrayList<String>> filterItems = new ArrayList<ArrayList<String>>();
-		if (filter != null) {
-			String[] args = SystemUtil.parseCommandLine(filter);
-			ArrayList<String> filterItem = new ArrayList<String>();
-			for (int i = 0; i < args.length; i++) {
-				String a = args[i];
-				if (a.equals("-f")) {
-					if (filterItem.size() > 0) 
-						filterItems.add(filterItem);
-					filterItem = new ArrayList<String>();
-				} else {
-					filterItem.add(a);
+//		if (!reposFile.exists())
+//			
+//			throw new InitializationError(String.format("repos '%s' does not exists ", repos));
+		
+		if(reposFile.exists()){
+			ArrayList<ArrayList<String>> filterItems = new ArrayList<ArrayList<String>>();
+			if (filter != null) {
+				String[] args = SystemUtil.parseCommandLine(filter);
+				ArrayList<String> filterItem = new ArrayList<String>();
+				for (int i = 0; i < args.length; i++) {
+					String a = args[i];
+					if (a.equals("-f")) {
+						if (filterItem.size() > 0) 
+							filterItems.add(filterItem);
+						filterItem = new ArrayList<String>();
+					} else {
+						filterItem.add(a);
+					}
 				}
+				
+				if (filterItem.size() > 0) 
+					filterItems.add(filterItem);
 			}
 			
-			if (filterItem.size() > 0) 
-				filterItems.add(filterItem);
-		}
-		
-		
-		ArrayList<Object[]> list = new ArrayList<Object[]>();
-		if (!collectFromFile(reposFile, list, filterItems))
-			if (!collectFromFiles(reposFile, list, filterItems))
-				collectFromDir(reposFile, list, filterItems);
-		
-		for (int i = 0; i < list.size(); i++) {
-			Object[] t = list.get(i);
-			for  (int j = 0; j < repeat; j++) {
-				TestClassRunnerForParameters runner = new TestClassRunnerForParameters(getTestClass().getJavaClass(),
t, i * repeat + j);
-				runners.add(runner);
+			
+			ArrayList<Object[]> list = new ArrayList<Object[]>();
+			if (!collectFromFile(reposFile, list, filterItems))
+				if (!collectFromFiles(reposFile, list, filterItems))
+					collectFromDir(reposFile, list, filterItems);
+			
+			for (int i = 0; i < list.size(); i++) {
+				Object[] t = list.get(i);
+				for  (int j = 0; j < repeat; j++) {
+					TestClassRunnerForParameters runner = new TestClassRunnerForParameters(getTestClass().getJavaClass(),
t, i * repeat + j);
+					runners.add(runner);
+				}
 			}
 		}
 



Mime
View raw message