[ARVADOS] updated: 1.1.3-243-gf728be2

Git user git at public.curoverse.com
Sat Mar 24 21:18:23 EDT 2018


Summary of changes:
 build/run-build-packages-one-target.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

       via  f728be219a1a3cd2cc65f52c3160d76d17a96656 (commit)
      from  a15ab44d2b2dad42a32dc0179ccdd686586893f3 (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 f728be219a1a3cd2cc65f52c3160d76d17a96656
Author: Ward Vandewege <wvandewege at veritasgenetics.com>
Date:   Sat Mar 24 21:16:47 2018 -0400

    build scripts: only run the package tests on packages built since the
    previous time the package test script ran. This speeds up the build
    pipeline significantly.
    
    No issue #
    
    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 c981b2a..31a546f 100755
--- a/build/run-build-packages-one-target.sh
+++ b/build/run-build-packages-one-target.sh
@@ -21,6 +21,8 @@ Syntax:
     Build only a specific package
 --only-test <package>
     Test only a specific package
+--force-test
+    Test even if there is no new untested package
 --build-version <string>
     Version to build (default:
     \$ARVADOS_BUILDING_VERSION-\$ARVADOS_BUILDING_ITERATION or
@@ -49,7 +51,7 @@ if ! [[ -d "$WORKSPACE" ]]; then
 fi
 
 PARSEDOPTS=$(getopt --name "$0" --longoptions \
-    help,debug,test-packages,target:,command:,only-test:,only-build:,build-version: \
+    help,debug,test-packages,target:,command:,only-test:,force-test,only-build:,build-version: \
     -- "" "$@")
 if [ $? -ne 0 ]; then
     exit 1
@@ -74,6 +76,9 @@ while [ $# -gt 0 ]; do
             test_packages=1
             packages="$2"; shift
             ;;
+        --force-test)
+            FORCE_TEST=true
+            ;;
         --only-build)
             ONLY_BUILD="$2"; shift
             ;;
@@ -204,6 +209,14 @@ if [[ -n "$test_packages" ]]; then
         if [[ -n "$ONLY_BUILD" ]] && [[ "$p" != "$ONLY_BUILD" ]]; then
             continue
         fi
+        if [[ -e "${WORKSPACE}/packages/.last_test_${TARGET}" ]] && [[ -z "$FORCE_TEST" ]]; then
+          MATCH=`find ${WORKSPACE}/packages/ -newer ${WORKSPACE}/packages/.last_test_${TARGET} -regex .*${TARGET}/$p.*`
+          if [[ "$MATCH" == "" ]]; then
+            # No new package has been built that needs testing
+            echo "Skipping $p test because no new package was built since the last test."
+            continue
+          fi
+        fi
         echo
         echo "START: $p test on $IMAGE" >&2
         if docker run --rm \
@@ -220,6 +233,8 @@ if [[ -n "$test_packages" ]]; then
             echo "ERROR: $p test on $IMAGE failed with exit status $FINAL_EXITCODE" >&2
         fi
     done
+
+    touch ${WORKSPACE}/packages/.last_test_${TARGET}
 else
     echo
     echo "START: build packages on $IMAGE" >&2

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list