Updated Branches:
  refs/heads/master aa354502a -> ea94ffbff

BIGTOP-793, add crunch integration tests


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/ea94ffbf
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/ea94ffbf
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/ea94ffbf

Branch: refs/heads/master
Commit: ea94ffbff65c1f904011f26c366a188cf8ff5bdb
Parents: 4a30741
Author: Johnny Zhang <[email protected]>
Authored: Tue Dec 4 20:10:00 2012 -0500
Committer: Roman Shaposhnik <[email protected]>
Committed: Tue Dec 4 14:02:06 2012 -0800

----------------------------------------------------------------------
 .../itest/crunchsmoke/TestCrunchSmoke.groovy       |   23 +++-----------
 bigtop-tests/test-artifacts/fatjar/pom.xml         |    4 +-
 bigtop-tests/test-artifacts/pom.xml                |    1 +
 3 files changed, 8 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/ea94ffbf/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
 
b/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
index 5a7a931..5dd94fd 100644
--- 
a/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
+++ 
b/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
@@ -23,11 +23,14 @@ import static org.junit.Assert.assertEquals
 import static org.junit.Assert.assertTrue
 
 import org.apache.bigtop.itest.shell.Shell
+import org.apache.bigtop.itest.TestUtils
 
 public class TestCrunchSmoke {
   static String runnerScript = "hadoop jar"
 
-  static String crunchJar = "/usr/lib/crunch/crunch-examples-*job.jar";
+  static String crunchJar = System.getProperty(
+    "org.apache.bigtop.itest.crunch.smoke.crunch.jar", 
+    "/usr/share/doc/crunch*/crunch-examples-*job.jar");
 
   static Shell sh = new Shell("/bin/bash -s");
   private static final String EXAMPLES = "crunch-examples";
@@ -35,23 +38,7 @@ public class TestCrunchSmoke {
 
   @BeforeClass
   static void setUp() {
-    sh.exec("hadoop fs -test -e $EXAMPLES");
-    if (sh.getRet() == 0) {
-      sh.exec("hadoop fs -rmr -skipTrash $EXAMPLES");
-      assertTrue("Deletion of previous $EXAMPLES from HDFS failed",
-          sh.getRet() == 0);
-    }
-    sh.exec("hadoop fs -test -e $EXAMPLES_OUT");
-    if (sh.getRet() == 0) {
-      sh.exec("hadoop fs -rmr -skipTrash $EXAMPLES_OUT");
-      assertTrue("Deletion of previous examples output from HDFS failed",
-          sh.getRet() == 0);
-    }
-
-    // copy test files to HDFS
-    sh.exec("hadoop fs -put $EXAMPLES $EXAMPLES",
-        "hadoop fs -mkdir $EXAMPLES_OUT");
-    assertTrue("Could not create output directory", sh.getRet() == 0);
+    TestUtils.unpackTestResources(TestCrunchSmoke.class, EXAMPLES, null, 
EXAMPLES_OUT);
   }
 
   static Map examples =

http://git-wip-us.apache.org/repos/asf/bigtop/blob/ea94ffbf/bigtop-tests/test-artifacts/fatjar/pom.xml
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/fatjar/pom.xml 
b/bigtop-tests/test-artifacts/fatjar/pom.xml
index dfb1a6a..4ca88b6 100644
--- a/bigtop-tests/test-artifacts/fatjar/pom.xml
+++ b/bigtop-tests/test-artifacts/fatjar/pom.xml
@@ -31,12 +31,12 @@
   <name>fatjar</name>
 
   <dependencies>
-    <!-- dependency>
+    <dependency>
       <groupId>org.apache.bigtop.itest</groupId>
       <artifactId>crunch-smoke</artifactId>
       <version>0.5.0-SNAPSHOT</version>
       <optional>true</optional>
-    </dependency -->
+    </dependency>
     <dependency>
       <groupId>org.apache.bigtop.itest</groupId>
       <artifactId>flume-smoke</artifactId>

http://git-wip-us.apache.org/repos/asf/bigtop/blob/ea94ffbf/bigtop-tests/test-artifacts/pom.xml
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/pom.xml 
b/bigtop-tests/test-artifacts/pom.xml
index fcec907..41648f8 100644
--- a/bigtop-tests/test-artifacts/pom.xml
+++ b/bigtop-tests/test-artifacts/pom.xml
@@ -44,6 +44,7 @@
     <module>giraph</module>
     <module>hue</module>
     <module>solr</module>
+    <module>crunch</module>
     <module>fatjar</module>
   </modules>
 

Reply via email to