ottobackwards commented on a change in pull request #1315: METRON-1956 add 
missing tests and some of the many shellcheck fixes
URL: https://github.com/apache/metron/pull/1315#discussion_r247950743
 
 

 ##########
 File path: dev-utilities/committer-utils/metron-committer-common
 ##########
 @@ -328,24 +326,126 @@ function review_commit_info {
 # Runs the metron unit, integration and metron-interface tests
 #
 function run_tests {
-    echo ""
-    echo ""
     read -p "  run test suite? [yN] " -n 1 -r
     echo
     if [[ $REPLY =~ ^[Yy]$ ]]; then
-      if [ "${UPSTREAM}" == "${METRON_UPSTREAM}" ]; then
-          mvn -q -T 2C -DskipTests clean install &&
-              mvn -q -T 2C surefire:test@unit-tests &&
-              mvn -q surefire:test@integration-tests &&
-              mvn -q test --projects metron-interface/metron-config &&
-          dev-utilities/build-utils/verify_licenses.sh
-      elif [ "${UPSTREAM}" == "${BRO_PLUGIN_UPSTREAM}" ]; then
+      if [[ "${UPSTREAM}" == "${METRON_UPSTREAM}" ]]; then
+        clean_metron_src
+
+        run_mvn_install
+
+        run_mvn_unit_tests
+
+        run_mvn_integration_tests
+
+        run_mvn_ui_tests
+
+        run_mvn_build_rpms
+
+        verify_licenses
+      elif [[ "${UPSTREAM}" == "${BRO_PLUGIN_UPSTREAM}" ]]; then
         echo "We don't currently support running metron-bro-plugin-kafka tests 
in this script"
       fi
     fi
 
 }
 
+#
+# Cleans the metron src and rpms
+#
+function clean_metron_src {
+
+    mvn -q clean
+
+    rc=$?; if [[ ${rc} != 0 ]]; then
+        echo "ERROR> FAILED TO CLEAN TOP LEVEL MVN PROJECT"
+        exit ${rc}
+    fi
+
+    cd metron-deployment &> /dev/null || echo "failed to change directory to 
metron-deployment" && exit 1
+
+    mvn -q clean -Pbuild-rpms
+
+    rc=$?; if [[ ${rc} != 0 ]]; then
+        echo "ERROR> FAILED TO CLEAN RPMS"
+        exit ${rc}
+    fi
+
+    cd .. &> /dev/null || echo "failed to change directory to metron source 
root" && exit 1
 
 Review comment:
   done

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to