make test: archive failed test data with build logs.

- Fix invocation of compress_failed.sh
- Fix compress_failed to copy compressed results
  files to $WORKSPACE/archives and return failure
  exit code.

Failed test case data will be copied to logs.fd.io
and found in the archives/<make test data dir>-FAILED
directory in the build log link in the
vpp-verify-master-ubuntu1604 jenkins job page.

For example:
https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-verify-master-ubuntu1604/7353/archives/

Change-Id: Ife9a0737115e69c0a8441e3bb0133af1528d909b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
diff --git a/test/scripts/compress_failed.sh b/test/scripts/compress_failed.sh
index 6076b3b..9559e2a 100755
--- a/test/scripts/compress_failed.sh
+++ b/test/scripts/compress_failed.sh
@@ -2,20 +2,36 @@
 
 if [ "$(ls -A ${VPP_TEST_FAILED_DIR})" ]
 then
-	if [ "${COMPRESS_FAILED_TEST_LOGS}" == "yes" ]
-	then
-		echo -n "Compressing files in temporary directories from failed test runs..."
-		cd ${VPP_TEST_FAILED_DIR}
-		for d in *
-		do
-			cd ${d}
-			find . ! -path . -print0 | xargs -0 -n1 gzip
-			cd ${VPP_TEST_FAILED_DIR}
-		done
-		echo "done."
-	else
-		echo "Not compressing files in temporary directories from failed test runs."
-	fi
+    if [ "${COMPRESS_FAILED_TEST_LOGS}" == "yes" ]
+    then
+	echo -n "Compressing files in temporary directories from failed test runs... "
+	cd ${VPP_TEST_FAILED_DIR}
+	for d in *
+	do
+	    cd ${d}
+	    find . ! -path . -print0 | xargs -0 -n1 gzip
+	    cd ${VPP_TEST_FAILED_DIR}
+	done
+	echo "done."
+        if [ -n "$WORKSPACE" ]
+        then
+            echo "Copying failed test logs into build log archive directory ($WORKSPACE/archives)... "
+            for failed_test in $(ls $VPP_TEST_FAILED_DIR)
+            do
+                mkdir -p $WORKSPACE/archives/$failed_test
+                cp -a $VPP_TEST_FAILED_DIR/$failed_test/* $WORKSPACE/archives/$failed_test
+            done
+	    echo "done."
+        fi
+        
+    else
+	echo "Not compressing files in temporary directories from failed test runs."
+    fi
 else
-	echo "No symlinks to failed tests' temporary directories found in ${VPP_TEST_FAILED_DIR}."
+    echo "No symlinks to failed tests' temporary directories found in ${VPP_TEST_FAILED_DIR}."
 fi
+
+# This script gets run only if there was a 'make test' failure,
+# so return failure error status so that the build results are
+# recorded correctly.
+exit 1