aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool/sysroot_wrapper/interactive_test.sh
diff options
context:
space:
mode:
authorCassidy Burden <cburden@google.com>2016-06-29 13:51:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-30 14:21:46 -0700
commitd5113fb3bb67fc27f6fdc04e757e7a4b65e2a5f4 (patch)
treed962dd23d137d73cfdc189b33fe27eb60cdd5e61 /binary_search_tool/sysroot_wrapper/interactive_test.sh
parentcaf9d96c94a914866c4cb9dfe401dfcee02c6047 (diff)
downloadtoolchain-utils-d5113fb3bb67fc27f6fdc04e757e7a4b65e2a5f4.tar.gz
binary search tool: Add object bisecting to bisect.py
Add object file bisecting to bisect.py. This is the frontend to the sysroot_wrapper bisection scripts. This bisection mode takes the following arguments: board, remote IP, package to bisect, and optionally the directory for the good/bad build trees. Adds default install/test scripts to sysroot_wrapper (similar to default scripts in cros_pkg) to support this bisection mode. TEST=Run unit tests and system test with cryptohome package CQ-DEPEND=CL:*267995 Change-Id: I1e9166b753f78ca7bdcf6ddbd056af62bc03923b Reviewed-on: https://chrome-internal-review.googlesource.com/268035 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/sysroot_wrapper/interactive_test.sh')
-rwxr-xr-xbinary_search_tool/sysroot_wrapper/interactive_test.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/binary_search_tool/sysroot_wrapper/interactive_test.sh b/binary_search_tool/sysroot_wrapper/interactive_test.sh
new file mode 100755
index 00000000..1b5b7e19
--- /dev/null
+++ b/binary_search_tool/sysroot_wrapper/interactive_test.sh
@@ -0,0 +1,37 @@
+#!/bin/bash -u
+#
+# Copyright 2016 Google Inc. All Rights Reserved.
+#
+# This script pings the chromebook to determine if it successfully booted.
+# It then asks the user if the image is good or not, allowing the user to
+# conduct whatever tests the user wishes, and waiting for a response.
+#
+# This script is intended to be used by binary_search_state.py, as
+# part of the binary search triage on ChromeOS object files. It waits for the
+# install script to build and install the image, then asks the user if the
+# image is good or not. It should return '0' if the test succeeds (the image
+# is 'good'); '1' if the test fails (the image is 'bad'); and '2' if it could
+# not determine (does not apply in this case).
+#
+
+source cros_pkg/common.sh
+
+ping -c 3 -W 3 ${BISECT_REMOTE}
+retval=$?
+
+if [[ ${retval} -eq 0 ]]; then
+ echo "ChromeOS image has been built and installed on ${BISECT_REMOTE}."
+else
+ exit 1
+fi
+
+while true; do
+ read -p "Is this a good ChromeOS image?" yn
+ case $yn in
+ [Yy]* ) exit 0;;
+ [Nn]* ) exit 1;;
+ * ) echo "Please answer yes or no.";;
+ esac
+done
+
+exit 2