[ARVADOS-DEV] updated: fec33dcaf67cb752c669915bb49dead9b8f11e4f

git at public.curoverse.com git at public.curoverse.com
Mon Oct 5 12:40:03 EDT 2015


Summary of changes:
 jenkins/run-tests.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

       via  fec33dcaf67cb752c669915bb49dead9b8f11e4f (commit)
      from  5a9879c969a110494880301464c80d648fcd560b (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 fec33dcaf67cb752c669915bb49dead9b8f11e4f
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Oct 5 12:48:56 2015 -0400

    Fix incorrect line numbers on compile errors reported by "go test" in coverage mode. No issue #

diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh
index 01b471a..0224f33 100755
--- a/jenkins/run-tests.sh
+++ b/jenkins/run-tests.sh
@@ -493,15 +493,22 @@ do_test_once() {
         then
             covername="coverage-$(echo "$1" | sed -e 's/\//_/g')"
             coverflags=("-covermode=count" "-coverprofile=$WORKSPACE/tmp/.$covername.tmp")
+            # We do "go get -t" here to catch compilation errors
+            # before trying "go test". Otherwise, coverage-reporting
+            # mode makes Go show the wrong line numbers when reporting
+            # compilation errors.
             if [[ -n "${testargs[$1]}" ]]
             then
                 # "go test -check.vv giturl" doesn't work, but this
                 # does:
-                cd "$WORKSPACE/$1" && go test ${coverflags[@]} ${testargs[$1]}
+                cd "$WORKSPACE/$1" && \
+                    go get -t "git.curoverse.com/arvados.git/$1" && \
+                    go test ${coverflags[@]} ${testargs[$1]}
             else
                 # The above form gets verbose even when testargs is
                 # empty, so use this form in such cases:
-                go test ${coverflags[@]} "git.curoverse.com/arvados.git/$1"
+                go get -t "git.curoverse.com/arvados.git/$1" && \
+                    go test ${coverflags[@]} "git.curoverse.com/arvados.git/$1"
             fi
             result="$?"
             go tool cover -html="$WORKSPACE/tmp/.$covername.tmp" -o "$WORKSPACE/tmp/$covername.html"

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list