1 #!/bin/bash -u 2 # 3 # Copyright 2016 Google Inc. All Rights Reserved. 4 # 5 # This script asks the user if the image is good or not, allowing the user to 6 # conduct whatever tests the user wishes, and waiting for a response. 7 # 8 # This script is intended to be used by binary_search_state.py, as 9 # part of the binary search triage on ChromeOS package and object files. It 10 # waits for the test setup script to build and install the image, then asks the 11 # user if the image is good or not. It should return '0' if the test succeeds 12 # (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125' 13 # if it could not determine (does not apply in this case). 14 # 15 16 source common/common.sh 17 18 while true; do 19 read -p "Is this a good ChromeOS image?" yn 20 case $yn in 21 [Yy]* ) exit 0;; 22 [Nn]* ) exit 1;; 23 * ) echo "Please answer yes or no.";; 24 esac 25 done 26 27 exit 125 28