You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crail.apache.org by pe...@apache.org on 2018/03/28 13:57:58 UTC

incubator-crail git commit: Include test-jars and dependencies in assembly

Repository: incubator-crail
Updated Branches:
  refs/heads/master 9b857f5de -> dc6135df8


Include test-jars and dependencies in assembly

Add test-jars and test dependencies to jars directory.
Add test option to bin/crail to allow run unit tests from
command line.

https://issues.apache.org/jira/browse/CRAIL-18

Close #12

Signed-off-by: Jonas Pfefferle <pe...@apache.org>


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

Branch: refs/heads/master
Commit: dc6135df86975e862a95ac0b2d0a127b8eb9eca1
Parents: 9b857f5
Author: Jonas Pfefferle <pe...@apache.org>
Authored: Wed Mar 28 14:25:35 2018 +0200
Committer: Jonas Pfefferle <pe...@apache.org>
Committed: Wed Mar 28 15:55:04 2018 +0200

----------------------------------------------------------------------
 assembly/pom.xml                        | 14 +++++++++++++-
 assembly/src/main/assembly/assembly.xml | 11 +++++++++--
 bin/crail                               |  7 +++++--
 3 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/dc6135df/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index e6e8be8..e303745 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -43,6 +43,12 @@
     </dependency>
     <dependency>
       <groupId>org.apache.crail</groupId>
+      <artifactId>crail-client</artifactId>
+      <version>1.0</version>
+      <type>test-jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.crail</groupId>
       <artifactId>crail-namenode</artifactId>
       <version>1.0</version>
     </dependency>
@@ -63,6 +69,12 @@
     </dependency>
     <dependency>
       <groupId>org.apache.crail</groupId>
+      <artifactId>crail-storage-nvmf</artifactId>
+      <version>1.0</version>
+      <type>test-jar</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.crail</groupId>
       <artifactId>crail-storage-narpc</artifactId>
       <version>1.0</version>
     </dependency>
@@ -102,7 +114,7 @@
 
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <executions>       
+        <executions>
           <execution>
             <id>dist</id>
             <phase>package</phase>

http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/dc6135df/assembly/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/assembly/assembly.xml b/assembly/src/main/assembly/assembly.xml
index a9776e4..e364a9f 100644
--- a/assembly/src/main/assembly/assembly.xml
+++ b/assembly/src/main/assembly/assembly.xml
@@ -1,6 +1,6 @@
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" 
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> 
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
   <id>bin</id>
   <formats>
     <format>tar.gz</format>
@@ -38,6 +38,13 @@
       <scope>runtime</scope>
       <useProjectArtifact>false</useProjectArtifact>
     </dependencySet>
+    <dependencySet>
+      <outputDirectory>jars</outputDirectory>
+      <useTransitiveDependencies>true</useTransitiveDependencies>
+      <unpack>false</unpack>
+      <scope>test</scope>
+      <useProjectArtifact>false</useProjectArtifact>
+    </dependencySet>
   </dependencySets>
 
 </assembly>

http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/dc6135df/bin/crail
----------------------------------------------------------------------
diff --git a/bin/crail b/bin/crail
index 0e2d3c6..cdf7c0b 100755
--- a/bin/crail
+++ b/bin/crail
@@ -30,6 +30,7 @@ function print_usage(){
   echo "  fsck                 run a Crail file check command"
   echo "  fs                   run a Crail shell command"
   echo "  iobench              run a Crail benchmark/test"
+  echo "  test                 run a Crail unit test"
 }
 
 if [ $# = 0 ]; then
@@ -59,9 +60,11 @@ elif [ "$COMMAND" = "fs" ] ; then
 elif [ "$COMMAND" = "getconf" ] ; then
   CLASS=org.apache.crail.hdfs.GetConf
 elif [ "$COMMAND" = "iobench" ] ; then
-  CLASS=org.apache.crail.tools.CrailBenchmark  
+  CLASS=org.apache.crail.tools.CrailBenchmark
 elif [ "$COMMAND" = "hdfsbench" ] ; then
-  CLASS=org.apache.crail.hdfs.tools.HdfsIOBenchmark    
+  CLASS=org.apache.crail.hdfs.tools.HdfsIOBenchmark
+elif [ "$COMMAND" = "test" ] ; then
+  CLASS=org.junit.runner.JUnitCore
 fi
 
 export CLASSPATH="$bin"/../jars/*:"$bin"/../conf:.