boot_test.sh revision d5113fb3bb67fc27f6fdc04e757e7a4b65e2a5f4
1#!/bin/bash -u
2#
3# Copyright 2016 Google Inc. All Rights Reserved.
4#
5# This script pings the chromebook to determine if it has successfully booted.
6#
7# This script is intended to be used by binary_search_state.py, as
8# part of the binary search triage on ChromeOS object files. It waits for the
9# install script to build and install the image, then pings the machine.
10# It should return '0' if the test succeeds (the image booted); '1' if the test
11# fails (the image did not boot); and '2' if it could not determine (does not
12# apply in this case).
13#
14
15source sysroot_wrapper/common.sh
16
17# Send 3 pings and wait 3 seconds for any responsed (then timeout).
18ping -c 3 -W 3 ${BISECT_REMOTE}
19retval=$?
20
21
22exit $retval
23