test_script.sh revision de0a90d676297a216dde2e47562b3a9f57621c41
1#!/bin/bash -u
2
3# This is an example execution script.
4# This script changes with the problem you are trying to fix.
5# This particular script was used to triage a problem where the kernel
6# would not boot while migrating to GCC 4.9.
7# Note it returns 0 only when the installation of the image succeeded
8# (ie: the machine booted after installation)
9
10source ./sysroot_wrapper/common.sh
11
12export BISECT_STAGE=TRIAGE
13echo "BISECT_STAGE=${BISECT_STAGE}"
14
15echo "State of sets"
16wc -l ${bisect_dir}/*_SET
17
18echo "Cleaning up"
19{ /usr/bin/sudo rm -rf /build/falco/var/cache/portage/sys-kernel && emerge-falco -C sys-kernel/chromeos-kernel-3_8-3.8.11-r96 || exit 2; } &>> /tmp/kernel_triage.log
20
21echo "Building"
22{ /usr/local/bin/emerge-falco =sys-kernel/chromeos-kernel-3_8-3.8.11-r96 || exit 2; } &>> /tmp/kernel_triage.log
23
24echo "Building image"
25{ /home/llozano/trunk/src/scripts/build_image --board=falco test || exit 2; } &>> /tmp/kernel_triage.log
26
27echo "Installing image"
28cros flash 172.17.187.150 latest &> /tmp/tmp_cros_flash_result.log
29
30cat /tmp/tmp_cros_flash_result.log >> /tmp/cros_flash_result.log
31
32grep "Cros Flash completed successfully" /tmp/tmp_cros_flash_result.log || exit 1
33
34exit 0
35