diff options
Diffstat (limited to 'binary_search_tool/sysroot_wrapper/test_setup_host.sh')
-rwxr-xr-x | binary_search_tool/sysroot_wrapper/test_setup_host.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/binary_search_tool/sysroot_wrapper/test_setup_host.sh b/binary_search_tool/sysroot_wrapper/test_setup_host.sh new file mode 100755 index 00000000..b5169eee --- /dev/null +++ b/binary_search_tool/sysroot_wrapper/test_setup_host.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Copyright 2017 Google Inc. All Rights Reserved. +# +# This is a generic ChromeOS package/image test setup script. It is meant to +# be used for either the object file or package bisection tools. This script +# is intended to be used with host object bisection, to bisect the object +# files in a host package. Since it deals with a host package, there is no +# building an image or flashing a device -- just building the host package +# itself. +# +# This script is intended to be used by binary_search_state.py, as +# part of the binary search triage on ChromeOS objects and packages. It should +# return '0' if the setup succeeds; and '1' if the setup fails (the image +# could not build or be flashed). +# + +export PYTHONUNBUFFERED=1 + +source common/common.sh + + +if [[ "${BISECT_MODE}" == "OBJECT_MODE" ]]; then + echo "EMERGING ${BISECT_PACKAGE}" + sudo -E emerge ${BISECT_PACKAGE} + emerge_status=$? + + if [[ ${emerge_status} -ne 0 ]] ; then + echo "emerging ${BISECT_PACKAGE} returned a non-zero status: $emerge_status" + exit 1 + fi + + exit 0 +fi + + +exit 0 |