aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-06-14 07:27:17 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-17 12:42:46 -0700
commitcc9b45677f0838f99c1961142fef4559de931604 (patch)
tree5661f86d2ce7613ae7f37590a0fcf6d34ba9fad4 /binary_search_tool
parentb51148ca9f8b8a9a1322342836ac5906f2564f85 (diff)
downloadtoolchain-utils-cc9b45677f0838f99c1961142fef4559de931604.tar.gz
[crosperf] Add phony image testing, for easier package development.
Using a 'real' bad image for bisecting tool development makes it very slow because it often requires manual intervention to push images onto device and to verify if image is good or bad. This CL creates a phony good/bad test that just looks at the md5 hash value of Chrome package, allowing testing to be done with two good images, which greatly simplifies bisecting tool development. BUG=None TEST=Tested these scripts individually in my chroot. Change-Id: I4342f8f152162e12f49b916f5977776aa79e1b03 Reviewed-on: https://chrome-internal-review.googlesource.com/264605 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'binary_search_tool')
-rwxr-xr-xbinary_search_tool/cros_pkg/cros_pkg_testing_test.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/binary_search_tool/cros_pkg/cros_pkg_testing_test.sh b/binary_search_tool/cros_pkg/cros_pkg_testing_test.sh
new file mode 100755
index 00000000..dc2edea9
--- /dev/null
+++ b/binary_search_tool/cros_pkg/cros_pkg_testing_test.sh
@@ -0,0 +1,36 @@
+#!/bin/bash -u
+#
+# Copyright 2015 Google Inc. All Rights Reserved.
+#
+# This script is intended to be used by binary_search_state.py, as
+# part of the binary search triage on ChromeOS packages. It is to be
+# used for testing/development of the binary search triage tool
+# itself. It waits for the install script to build and install the
+# image, then checks the hash of the chrome package being used to build.
+# If the hash matches the test hash, then the image is 'good',
+# otherwise it is 'bad'. This allows the rest of the bisecting tool
+# to run without requiring help from the user (as it would if we were
+# dealing with a real 'bad' image).
+#
+
+source cros_pkg_common.sh
+
+#
+#Initialize the value below before using this script!!!
+# e.g. if 'md5sum /build/${BOARD}/packages/chromeos-base/chromeos-chrome*' shows
+#
+# 6a003f76caac3cdbcf6e0f6ea307f10f /build/daisy/packages/chromeos-base/chromeos-chrome-53.0.2754.0_rc-r1.tbz2
+#
+# Then initialize HASH below to '6a003f76caac3cdbcf6e0f6ea307f10f'
+#
+HASH=''
+
+if [ -z "${HASH}" ]
+then
+ echo "ERROR: HASH must be intialized in cros_pkg_testing_test.sh"
+ exit 3
+fi
+
+test_hash=$(md5sum /build/${BOARD}/packages/chromeos-base/chromeos-chrome* | awk '{print $1}')
+[[ "${HASH}" == "${test_hash}" ]]
+exit $?