Author: rvs
Date: Wed Oct 3 21:14:29 2012
New Revision: 1393766
URL: http://svn.apache.org/viewvc?rev=1393766&view=rev
Log:
BIGTOP-726. make it possible to run HiveBulkScriptExecutor scripts selectively
Modified:
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/IntegrationTestHiveSmokeBulk.groovy
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/TestHiveSmokeBulk.groovy
Modified:
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/IntegrationTestHiveSmokeBulk.groovy
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/IntegrationTestHiveSmokeBulk.groovy?rev=1393766&r1=1393765&r2=1393766&view=diff
==============================================================================
---
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/IntegrationTestHiveSmokeBulk.groovy
(original)
+++
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/IntegrationTestHiveSmokeBulk.groovy
Wed Oct 3 21:14:29 2012
@@ -28,6 +28,10 @@ import org.junit.runners.Parameterized.P
@RunWith(OrderedParameterized.class)
public class IntegrationTestHiveSmokeBulk {
+ private static String test_include =
+
System.getProperty("org.apache.bigtop.itest.hivesmoke.IntegrationTestHiveSmokeBulk.test_include");
+ private static String test_exclude =
+
System.getProperty("org.apache.bigtop.itest.hivesmoke.IntegrationTestHiveSmokeBulk.test_exclude");
private static String extra_jars =
System.getProperty("org.apache.bigtop.itest.hivesmoke.IntegrationTestHiveSmokeBulk.extra_jars","");
@@ -68,8 +72,16 @@ public class IntegrationTestHiveSmokeBul
@Parameters
public static Map<String, Object[]> readTestCases() {
+ List<String> tests;
+ if (test_include != null) {
+ tests =
scripts.getScripts().intersect(Arrays.asList(test_include.split(",")));
+ } else if (test_exclude != null) {
+ tests = scripts.getScripts() - Arrays.asList(test_exclude.split(","));
+ } else {
+ tests = scripts.getScripts();
+ }
Map res = [:];
- scripts.getScripts().each {
+ tests.each {
res[it] = ([it] as String[]);
};
return res;
Modified:
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/TestHiveSmokeBulk.groovy
URL:
http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/TestHiveSmokeBulk.groovy?rev=1393766&r1=1393765&r2=1393766&view=diff
==============================================================================
---
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/TestHiveSmokeBulk.groovy
(original)
+++
incubator/bigtop/trunk/bigtop-tests/test-artifacts/hive/src/main/groovy/org/apache/bigtop/itest/hivesmoke/TestHiveSmokeBulk.groovy
Wed Oct 3 21:14:29 2012
@@ -28,6 +28,10 @@ import org.junit.runners.Parameterized.P
@RunWith(OrderedParameterized.class)
public class TestHiveSmokeBulk {
+ private static String test_include =
+
System.getProperty("org.apache.bigtop.itest.hivesmoke.TestHiveSmokeBulk.test_include");
+ private static String test_exclude =
+
System.getProperty("org.apache.bigtop.itest.hivesmoke.TestHiveSmokeBulk.test_exclude");
static Shell sh = new Shell("/bin/bash -s");
static HiveBulkScriptExecutor scripts = new
HiveBulkScriptExecutor("scripts/ql");
@@ -67,8 +71,16 @@ public class TestHiveSmokeBulk {
@Parameters
public static Map<String, Object[]> readTestCases() {
+ List<String> tests;
+ if (test_include != null) {
+ tests =
scripts.getScripts().intersect(Arrays.asList(test_include.split(",")));
+ } else if (test_exclude != null) {
+ tests = scripts.getScripts() - Arrays.asList(test_exclude.split(","));
+ } else {
+ tests = scripts.getScripts();
+ }
Map res = [:];
- scripts.getScripts().collect {
+ tests.each {
res[it] = ([it] as String[]);
};
return res;