Browse code

print out git references for trees

in order to be sure we understand the environment that's running
in an upstream test, print out the git information for the tree.
This will hopefully address questions of "which commit of tempest"
is being used for particular tests.

Change-Id: Ief4e8a17fd75945f02982d2adf8625fe927d823d

Sean Dague authored on 2013/09/24 03:17:06
Showing 1 changed files
... ...
@@ -548,12 +548,18 @@ function is_arch {
548 548
 # Uses global ``OFFLINE``
549 549
 # git_clone remote dest-dir branch
550 550
 function git_clone {
551
-    [[ "$OFFLINE" = "True" ]] && return
552
-
553 551
     GIT_REMOTE=$1
554 552
     GIT_DEST=$2
555 553
     GIT_REF=$3
556 554
 
555
+    if [[ "$OFFLINE" = "True" ]]; then
556
+        echo "Running in offline mode, clones already exist"
557
+        # print out the results so we know what change was used in the logs
558
+        cd $GIT_DEST
559
+        git show --oneline
560
+        return
561
+    fi
562
+
557 563
     if echo $GIT_REF | egrep -q "^refs"; then
558 564
         # If our branch name is a gerrit style refs/changes/...
559 565
         if [[ ! -d $GIT_DEST ]]; then
... ...
@@ -595,6 +601,10 @@ function git_clone {
595 595
 
596 596
         fi
597 597
     fi
598
+
599
+    # print out the results so we know what change was used in the logs
600
+    cd $GIT_DEST
601
+    git show --oneline
598 602
 }
599 603
 
600 604