[ARVADOS] updated: 1.3.0-220-g2b6be8593

Git user git at public.curoverse.com
Mon Feb 4 17:21:37 EST 2019


Summary of changes:
 build/run-build-packages-one-target.sh | 62 +++++++++++++++++++++-------------
 1 file changed, 38 insertions(+), 24 deletions(-)

       via  2b6be8593e8d3ea66cdec042ea474574e3b7c6c5 (commit)
      from  84e42cb0ee279b8ade543146ba3967786d098119 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2b6be8593e8d3ea66cdec042ea474574e3b7c6c5
Author: Ward Vandewege <wvandewege at veritasgenetics.com>
Date:   Mon Feb 4 17:21:22 2019 -0500

    Do not try to test packages that were not built.
    
    refs #9945
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege at veritasgenetics.com>

diff --git a/build/run-build-packages-one-target.sh b/build/run-build-packages-one-target.sh
index 46379e7b9..9b21b58e2 100755
--- a/build/run-build-packages-one-target.sh
+++ b/build/run-build-packages-one-target.sh
@@ -74,6 +74,7 @@ while [ $# -gt 0 ]; do
             ;;
         --only-test)
             test_packages=1
+            testing_one_package=1
             packages="$2"; shift
             ;;
         --force-test)
@@ -121,33 +122,33 @@ if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
 fi
 
 if [[ -n "$test_packages" ]]; then
-    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.rpm')" ]] ; then
-	set +e
-	/usr/bin/which createrepo >/dev/null
-	if [[ "$?" != "0" ]]; then
-		echo >&2
-		echo >&2 "Error: please install createrepo. E.g. sudo apt-get install createrepo"
-		echo >&2
-		exit 1
-	fi
-	set -e
-        createrepo $WORKSPACE/packages/$TARGET
+  if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.rpm')" ]] ; then
+    set +e
+    /usr/bin/which createrepo >/dev/null
+    if [[ "$?" != "0" ]]; then
+      echo >&2
+      echo >&2 "Error: please install createrepo. E.g. sudo apt-get install createrepo"
+      echo >&2
+      exit 1
     fi
+    set -e
+    createrepo $WORKSPACE/packages/$TARGET
+  fi
 
-    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.deb')" ]] ; then
-        (cd $WORKSPACE/packages/$TARGET
-          dpkg-scanpackages .  2> >(grep -v 'warning' 1>&2) | tee Packages | gzip -c > Packages.gz
-          apt-ftparchive -o APT::FTPArchive::Release::Origin=Arvados release . > Release
-        )
-    fi
+  if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.deb')" ]] ; then
+    (cd $WORKSPACE/packages/$TARGET
+      dpkg-scanpackages .  2> >(grep -v 'warning' 1>&2) | tee Packages | gzip -c > Packages.gz
+      apt-ftparchive -o APT::FTPArchive::Release::Origin=Arvados release . > Release
+    )
+  fi
 
-    COMMAND="/jenkins/package-testing/test-packages-$TARGET.sh"
-    IMAGE="arvados/package-test:$TARGET"
+  COMMAND="/jenkins/package-testing/test-packages-$TARGET.sh"
+  IMAGE="arvados/package-test:$TARGET"
 else
-    IMAGE="arvados/build:$TARGET"
-    if [[ "$COMMAND" != "" ]]; then
-        COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET$DEBUG"
-    fi
+  IMAGE="arvados/build:$TARGET"
+  if [[ "$COMMAND" != "" ]]; then
+    COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND --target $TARGET$DEBUG"
+  fi
 fi
 
 JENKINS_DIR=$(dirname "$(readlink -e "$0")")
@@ -218,6 +219,17 @@ if [[ -n "$test_packages" ]]; then
             continue
           fi
         fi
+        # If we're testing all packages, we should not error out on packages that don't exist.
+        # If we are testing one specific package only (i.e. --only-test was given), we should
+        # error out if that package does not exist.
+        if [[ -z "$testing_one_package" ]]; then
+          MATCH=`find ${WORKSPACE}/packages/ -regextype posix-extended -regex .*${TARGET}/$p.*\\(deb\\|rpm\\)`
+          if [[ "$MATCH" == "" ]]; then
+            # No new package has been built that needs testing
+            echo "Skipping $p test because no package file is available to test."
+            continue
+          fi
+        fi
         echo
         echo "START: $p test on $IMAGE" >&2
         # ulimit option can be removed when debian8 and ubuntu1404 are retired
@@ -237,7 +249,9 @@ if [[ -n "$test_packages" ]]; then
         fi
     done
 
-    touch ${WORKSPACE}/packages/.last_test_${TARGET}
+    if [[ "$FINAL_EXITCODE" == "0" ]]; then
+      touch ${WORKSPACE}/packages/.last_test_${TARGET}
+    fi
 else
     echo
     echo "START: build packages on $IMAGE" >&2

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list