changed the test framework to ignore test files that do not match the expected test file format

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@1402 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
index 74c47ac..e088821 100644
--- a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
+++ b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/context/TestCaseContext.java
@@ -4,6 +4,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.logging.Logger;
 
 import edu.uci.ics.asterix.testframework.xml.TestCase;
 import edu.uci.ics.asterix.testframework.xml.TestCase.CompilationUnit;
@@ -12,6 +13,8 @@
 import edu.uci.ics.asterix.testframework.xml.TestSuiteParser;
 
 public class TestCaseContext {
+    private static final Logger LOGGER = Logger.getLogger(TestCaseContext.class.getName());
+
     public static final String DEFAULT_TESTSUITE_XML_NAME = "testsuite.xml";
 
     private File tsRoot;
@@ -55,9 +58,17 @@
 
         String fileNames[] = path.list();
         for (String fName : fileNames) {
+            if (fName.startsWith(".")) {
+                continue;
+            }
             File testFile = new File(path, fName);
             TestFileContext tfsc = new TestFileContext(testFile);
             String[] nameSplits = fName.split("\\.");
+            if (nameSplits.length < 3) {
+                LOGGER.warning("Ignoring test file '" + cUnit.getName() + File.separatorChar + fName
+                        + "' since it does not have the proper test file name format.");
+                continue;
+            }
             tfsc.setSeqNum(nameSplits[nameSplits.length - 3]);
             tfsc.setType(nameSplits[nameSplits.length - 2]);
             testFileCtxs.add(tfsc);