Bazel build for STC runs

Change-Id: I75806c0cb5b71402b7e3519a84498f8e05a9cf8a
diff --git a/tools/test/bin/onos-check-bits b/tools/test/bin/onos-check-bits
index 2b0acd3..1196e27 100755
--- a/tools/test/bin/onos-check-bits
+++ b/tools/test/bin/onos-check-bits
@@ -6,18 +6,17 @@
 [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
 . $ONOS_ROOT/tools/build/envDefaults
 
-# If the BUCK-built bits are newer than the Maven-built bits, use the former.
+# If the bazel-built bits are newer than the buck-built bits, use the former.
 BUCK_TAR=$ONOS_ROOT/buck-out/gen/tools/package/onos-package/onos.tar.gz
-if [ -f $BUCK_TAR ] && [ $BUCK_TAR -nt $ONOS_TAR ]; then
-  rm -f $ONOS_TAR >/dev/null; ln -s $BUCK_TAR $ONOS_TAR
+BAZEL_TAR=$ONOS_ROOT/bazel-bin/onos.tar.gz
+if [ -f $BAZEL_TAR ] && [ $BAZEL_TAR -nt $ONOS_TAR ]; then
+    rm -f $ONOS_TAR >/dev/null; ln -s $BAZEL_TAR $ONOS_TAR
+else
+    if [ -f $BUCK_TAR ] && [ $BUCK_TAR -nt $ONOS_TAR ]; then
+        rm -f $ONOS_TAR >/dev/null; ln -s $BUCK_TAR $ONOS_TAR
+    fi
 fi
 
-# If the Bazel-built bits are newer than the BUCK-built bits, use the former.
-# BAZEL_TAR=$ONOS_ROOT/bazel-bin/tools/package/onos.tar.gz
-# if [ -f $BAZEL_TAR ] && [ $BAZEL_TAR -nt $BUCK_TAR ]; then
-#   rm -f $ONOS_TAR >/dev/null; ln -s $BAZEL_TAR $ONOS_TAR
-# fi
-
 ls -lL $ONOS_TAR  && cksum $ONOS_TAR
 if [ $? -ne 0 ]; then
   echo "ONOS archive is unreadable" && exit 1