Merge remote-tracking branch 'origin' into ceej/tiered-tests
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index 6dbc506..f4c57ce 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -8,14 +8,14 @@
 	License for the specific language governing permissions and ! limitations 
 	under the License. ! -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<artifactId>asterix</artifactId>
-		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.8.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>asterix-app</artifactId>
-
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>asterix</artifactId>
+    <groupId>edu.uci.ics.asterix</groupId>
+    <version>0.8.4-SNAPSHOT</version>
+  </parent>
+  <artifactId>asterix-app</artifactId>
+  
 	<build>
 		<plugins>
 			<plugin>
@@ -76,26 +76,6 @@
 					</execution>
 				</executions>
 			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-surefire-plugin</artifactId>
-				<version>2.8</version>
-				<configuration>
-					<!-- doesn't work from m2eclipse, currently <additionalClasspathElements> 
-						<additionalClasspathElement>${basedir}/src/main/resources</additionalClasspathElement> 
-						</additionalClasspathElements> -->
-					<forkMode>pertest</forkMode>
-					<argLine>-enableassertions -Xmx${test.heap.size}m
-						-Dfile.encoding=UTF-8
-						-Djava.util.logging.config.file=src/test/resources/logging.properties
-						-Xdebug
-						-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n</argLine>
-					<includes>
-						<include>**/*TestSuite.java</include>
-						<include>**/*Test.java</include>
-					</includes>
-				</configuration>
-			</plugin>
 		</plugins>
 	</build>
 
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 9cdc3df..5d4ecdd 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -14,7 +14,7 @@
  !-->
 <test-suite xmlns="urn:xml.testframework.asterix.ics.uci.edu" ResultOffsetPath="results" QueryOffsetPath="queries" QueryFileExtension=".aql">
   <test-group name="flwor">
-    <test-case FilePath="flwor">
+    <test-case FilePath="flwor" category="slow">
       <compilation-unit name="at00">
         <output-dir compare="Text">at00</output-dir>
       </compilation-unit>
diff --git a/asterix-fuzzyjoin/pom.xml b/asterix-fuzzyjoin/pom.xml
index 95ecfd8..dc49e55 100644
--- a/asterix-fuzzyjoin/pom.xml
+++ b/asterix-fuzzyjoin/pom.xml
@@ -45,14 +45,6 @@
           <outputDirectory>${basedir}/target</outputDirectory>
         </configuration>
       </plugin>
-      <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-surefire-plugin</artifactId>
-	<configuration>
-	  <forkMode>pertest</forkMode>
-	  <argLine>-enableassertions -Xmx1g</argLine>
-	</configuration>
-      </plugin>
     </plugins>
   </build>
 
diff --git a/asterix-test-framework/pom.xml b/asterix-test-framework/pom.xml
index 4329a9c..a1ea210 100644
--- a/asterix-test-framework/pom.xml
+++ b/asterix-test-framework/pom.xml
@@ -46,6 +46,4 @@
 		</plugins>
 	</build>
 
-	<dependencies>
-	</dependencies>
 </project>
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 cee292e..a416144 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
@@ -19,6 +19,7 @@
 import java.util.Collections;
 import java.util.List;
 
+import edu.uci.ics.asterix.testframework.xml.CategoryEnum;
 import edu.uci.ics.asterix.testframework.xml.TestCase;
 import edu.uci.ics.asterix.testframework.xml.TestCase.CompilationUnit;
 import edu.uci.ics.asterix.testframework.xml.TestGroup;
@@ -156,11 +157,14 @@
         }
 
         private void addContexts(File tsRoot, TestSuite ts, List<TestGroup> tgPath, List<TestCaseContext> tccs) {
+	    boolean skipSlow = System.getProperty("skipSlowTests") != null;
             TestGroup tg = tgPath.get(tgPath.size() - 1);
             for (TestCase tc : tg.getTestCase()) {
-                tccs.add(new TestCaseContext(tsRoot, ts, tgPath.toArray(new TestGroup[tgPath.size()]), tc));
+		if (skipSlow && tc.getCategory() != CategoryEnum.SLOW) {
+		    tccs.add(new TestCaseContext(tsRoot, ts, tgPath.toArray(new TestGroup[tgPath.size()]), tc));
+		}
             }
             addContexts(tsRoot, ts, tgPath, tg.getTestGroup(), tccs);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/xml/TestSuiteParser.java b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/xml/TestSuiteParser.java
index e578924..8ffa9b3 100644
--- a/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/xml/TestSuiteParser.java
+++ b/asterix-test-framework/src/main/java/edu/uci/ics/asterix/testframework/xml/TestSuiteParser.java
@@ -22,8 +22,8 @@
     public TestSuiteParser() {
     }
 
-    public TestSuite parse(File testSuiteCatalog) throws Exception {
-        JAXBContext ctx = JAXBContext.newInstance(TestSuite.class);
-        return (TestSuite) ctx.createUnmarshaller().unmarshal(testSuiteCatalog);
+    public edu.uci.ics.asterix.testframework.xml.TestSuite parse(File testSuiteCatalog) throws Exception {
+        JAXBContext ctx = JAXBContext.newInstance(edu.uci.ics.asterix.testframework.xml.TestSuite.class);
+        return (edu.uci.ics.asterix.testframework.xml.TestSuite) ctx.createUnmarshaller().unmarshal(testSuiteCatalog);
     }
 }
\ No newline at end of file
diff --git a/asterix-test-framework/src/main/resources/Catalog.xsd b/asterix-test-framework/src/main/resources/Catalog.xsd
index 632d6ad..763309e 100644
--- a/asterix-test-framework/src/main/resources/Catalog.xsd
+++ b/asterix-test-framework/src/main/resources/Catalog.xsd
@@ -135,6 +135,7 @@
 

                <!-- This name is always equal to the name of the test case -->

                <xs:attribute name="name" type="xs:string" use="required"/>

+

             </xs:complexType>

          </xs:element>

 

@@ -150,8 +151,24 @@
 

       <xs:attribute name="FilePath" type="test:SimplifiedRelativeFilePath" use="required"/>

       <xs:attribute name="date" type="xs:date" use="required"/>

+      <xs:attribute name="category" type="test:category-enum"/>

    </xs:complexType>

 

+   <!-- category-enum type                                                   -->

+   <!--    Identify which category of test this is. Currently only "slow".   -->

+

+   <xs:simpleType name="category-enum">

+      <xs:annotation>

+         <xs:documentation>

+            Identify the category of test, for limiting when it is run.

+         </xs:documentation>

+      </xs:annotation>

+

+      <xs:restriction base="xs:string">

+         <xs:enumeration value="slow"/>

+      </xs:restriction>

+   </xs:simpleType>

+

    <!-- comparison-enum type                                                 -->

    <!--    Identify the type of comparison used to determine whether an      -->

    <!--    expected result and an actual result match.                       -->

diff --git a/asterix-tools/pom.xml b/asterix-tools/pom.xml
index 04edf26..83dbe0e 100644
--- a/asterix-tools/pom.xml
+++ b/asterix-tools/pom.xml
@@ -57,37 +57,6 @@
 				</executions>
 			</plugin>
 			<plugin>
-				<artifactId>maven-surefire-plugin</artifactId>
-				<version>2.7.2</version>
-				<executions>
-					<execution>
-						<id>default-test</id>
-						<phase>test</phase>
-						<goals>
-							<goal>test</goal>
-						</goals>
-						<configuration>
-							<forkMode>pertest</forkMode>
-							<argLine>-enableassertions -Xmx1024m -Dfile.encoding=UTF-8
-								-Djava.util.logging.config.file=src/test/resources/logging.properties</argLine>
-							<includes>
-								<include>**/*TestSuite.java</include>
-								<include>**/*Test.java</include>
-							</includes>
-						</configuration>
-					</execution>
-				</executions>
-				<configuration>
-					<forkMode>pertest</forkMode>
-					<argLine>-enableassertions -Xmx1536m -Dfile.encoding=UTF-8
-						-Djava.util.logging.config.file=src/test/resources/logging.properties</argLine>
-					<includes>
-						<include>**/*TestSuite.java</include>
-						<include>**/*Test.java</include>
-					</includes>
-				</configuration>
-			</plugin>
-			<plugin>
 				<groupId>org.codehaus.mojo</groupId>
 				<artifactId>appassembler-maven-plugin</artifactId>
 				<version>1.0</version>
diff --git a/pom.xml b/pom.xml
index c0dfb4e..8e54001 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,28 +14,54 @@
  ! limitations under the License.
  !-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>edu.uci.ics.asterix</groupId>
-	<artifactId>asterix</artifactId>
-	<version>0.8.4-SNAPSHOT</version>
-	<packaging>pom</packaging>
-
-    <properties>
-    	<algebricks.version>0.2.11-SNAPSHOT</algebricks.version>
-    	<hyracks.version>0.2.11-SNAPSHOT</hyracks.version>
-    </properties>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>edu.uci.ics.asterix</groupId>
+  <artifactId>asterix</artifactId>
+  <version>0.8.4-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  
+  <properties>
+    <algebricks.version>0.2.11-SNAPSHOT</algebricks.version>
+    <hyracks.version>0.2.11-SNAPSHOT</hyracks.version>
+    <jvm.extraargs />
+    <skipSlowTests>true</skipSlowTests>
+  </properties>
 
 	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-release-plugin</artifactId>
-				<version>2.1</version>
-				<configuration>
-                    <goals>package source:jar javadoc:jar deploy:deploy</goals>
-				</configuration>
-			</plugin>
-		</plugins>
+	  <plugins>
+	    <plugin>
+	      <groupId>org.apache.maven.plugins</groupId>
+	      <artifactId>maven-release-plugin</artifactId>
+	      <version>2.1</version>
+	      <configuration>
+                <goals>package source:jar javadoc:jar deploy:deploy</goals>
+	      </configuration>
+	    </plugin>
+	    <plugin>
+	      <groupId>org.apache.maven.plugins</groupId>
+	      <artifactId>maven-surefire-plugin</artifactId>
+	      <version>2.8</version>
+	      <configuration>
+		<failIfNoTests>false</failIfNoTests>
+		<systemPropertyVariables>
+                  <skipFredSlowTests>true</skipFredSlowTests>
+		</systemPropertyVariables>
+		<!-- doesn't work from m2eclipse, currently <additionalClasspathElements> 
+		     <additionalClasspathElement>${basedir}/src/main/resources</additionalClasspathElement> 
+		     </additionalClasspathElements> -->
+		<forkMode>pertest</forkMode>
+		<argLine>-enableassertions -Xmx${test.heap.size}m
+		-Dfile.encoding=UTF-8
+		-Djava.util.logging.config.file=${user.home}/logging.properties
+		-Xdebug
+		-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n</argLine>
+		<includes>
+		  <include>**/*TestSuite.java</include>
+		  <include>**/*Test.java</include>
+		</includes>
+	      </configuration>
+	    </plugin>
+	  </plugins>
 	</build>
 
 	<scm>
@@ -80,6 +106,14 @@
             <test.heap.size>3072</test.heap.size>
           </properties>
         </profile>
+
+        <profile>
+          <id>slow</id>
+          <properties>
+            <skipSlowTests>false</skipSlowTests>
+          </properties>
+        </profile>
+
     </profiles>
 
 	<modules>
diff --git a/tlp/pom.xml b/tlp/pom.xml
new file mode 100644
index 0000000..c6c32ad
--- /dev/null
+++ b/tlp/pom.xml
@@ -0,0 +1,28 @@
+<!--
+ ! Copyright 2009-2013 by The Regents of the University of California
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! you may obtain a copy of the License from
+ ! 
+ !     http://www.apache.org/licenses/LICENSE-2.0
+ ! 
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>edu.uci.ics</groupId>
+  <artifactId>experimental</artifactId>
+  <version>0.0.1</version>
+  <packaging>pom</packaging>
+  <name>hyracks-asterix</name>
+
+  <modules>
+    <module>hyracks</module>
+    <module>asterixdb</module>
+  </modules>
+</project>