Merge remote-tracking branch 'google/master' into ceej/tiered-tests
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index 6dbc506..e3f0960 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -81,6 +81,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration>
+ <systemPropertyVariables>
+ <skipSlowTests>true</skipSlowTests>
+ </systemPropertyVariables>
<!-- doesn't work from m2eclipse, currently <additionalClasspathElements>
<additionalClasspathElement>${basedir}/src/main/resources</additionalClasspathElement>
</additionalClasspathElements> -->
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 067fddb..63b3e4e 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-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/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. -->