Repository: mnemonic
Updated Branches:
  refs/heads/master eab06091f -> d998b5ac8


MNEMONIC-440 & MNEMONIC-441: Skip test cases for Spark&Hadoop integration in 
run-all script if running on JDK9


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

Branch: refs/heads/master
Commit: d998b5ac8ec3ca6702e6094e126eb976dc10c6cf
Parents: eab0609
Author: Ganhuazhang <ganhua.zh...@gmail.com>
Authored: Tue Jan 30 22:34:48 2018 -0800
Committer: Ganhuazhang <ganhua.zh...@gmail.com>
Committed: Tue Jan 30 22:34:48 2018 -0800

----------------------------------------------------------------------
 bin/runTestCases.py | 24 ++++++++++++++----------
 pom.xml             | 19 ++++++-------------
 2 files changed, 20 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mnemonic/blob/d998b5ac/bin/runTestCases.py
----------------------------------------------------------------------
diff --git a/bin/runTestCases.py b/bin/runTestCases.py
index e5724e8..1fe64a8 100755
--- a/bin/runTestCases.py
+++ b/bin/runTestCases.py
@@ -36,15 +36,19 @@ with open(testCmdFile) as fp:
     for line in fp:
         match = tcCmdReg.findall(line)
         if match:
-            logFilePath = testLogDir + tcNameReg.findall(line)[0] + ".log"
-            print("[INFO] Running " + tcNameReg.findall(line)[0] + " test case 
for \"" + tcModuleReg.findall(line)[0] + "\"...")
-            try:
-                #maven build
-                subprocess.check_call(match[0] + ">" + logFilePath, 
stderr=subprocess.STDOUT, shell=True)
-                subprocess.call(cleanupCmd, stderr=subprocess.STDOUT, 
shell=True)
-                print("[SUCCESS] Test case " + tcNameReg.findall(line)[0] + " 
for \"" + tcModuleReg.findall(line)[0]+ "\" is completed!")
-            except subprocess.CalledProcessError as e:
-                print("[ERROR] Please refer to testlog/" + 
tcNameReg.findall(line)[0] + ".log for detailed information.")
-                sys.exit(1)
+            tc_module_target_path = tcModuleReg.findall(line)[0] + "/target"
+            if any(fname.endswith('.jar') for fname in 
os.listdir(tc_module_target_path)):
+                logFilePath = testLogDir + tcNameReg.findall(line)[0] + ".log"
+                print("[INFO] Running " + tcNameReg.findall(line)[0] + " test 
case for \"" + tcModuleReg.findall(line)[0] + "\"...")
+                try:
+                    #maven build
+                    subprocess.check_call(match[0] + ">" + logFilePath, 
stderr=subprocess.STDOUT, shell=True)
+                    subprocess.call(cleanupCmd, stderr=subprocess.STDOUT, 
shell=True)
+                    print("[SUCCESS] Test case " + tcNameReg.findall(line)[0] 
+ " for \"" + tcModuleReg.findall(line)[0]+ "\" is completed!")
+                except subprocess.CalledProcessError as e:
+                    print("[ERROR] Please refer to testlog/" + 
tcNameReg.findall(line)[0] + ".log for detailed information.")
+                    sys.exit(1)
+            else:
+                print("[WARN] JAR file not found in " + 
tcNameReg.findall(line)[0] + " test case for \"" + tcModuleReg.findall(line)[0] 
+ "\".")
 print("[DONE] All test cases are completed! Log files are available under 
folder testlog.")
 

http://git-wip-us.apache.org/repos/asf/mnemonic/blob/d998b5ac/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e256bbf..409b2a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -211,29 +211,22 @@
           </execution>
         </executions-->
       </plugin>
-      <!--plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-clean-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>auto-clean</id>
-            <phase>initialize</phase>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
+        <version>3.0.0</version>
         <configuration>
           <filesets>
             <fileset>
               <directory>.</directory>
               <includes>
-                <include>*.dat</include>
+                <!-- use to clear all jar files to prevent it from performing 
test if not built on jdk9 -->
+                <include>**/target/*.jar</include>
               </includes>
             </fileset>
           </filesets>
         </configuration>
-      </plugin-->
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
@@ -361,7 +354,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.19.1</version>
+          <version>2.20.1</version>
           <configuration>
             <skipTests>${skipTests}</skipTests>
             <enableAssertions>true</enableAssertions>

Reply via email to