aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool
diff options
context:
space:
mode:
authorCassidy Burden <cburden@google.com>2016-08-01 12:10:35 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-01 15:56:10 -0700
commita742f71e420a07c474a8fb9307426ddb0574dcf3 (patch)
tree584a02ad1ab2c08f3efe2bca2efc7b022c2e45cd /binary_search_tool
parent660e682dae1e34076cb758694be67edfc7bc6ed4 (diff)
downloadtoolchain-utils-a742f71e420a07c474a8fb9307426ddb0574dcf3.tar.gz
binary search tool: Change skip exit status to 125
Because exit status 2 means syntax error, it is confusing to also use exit status 2 to mean "skip image". Change uses of status 2 to status 125. Change-Id: I3620e3eb6e52523dc51804076284abf1e023d14f Reviewed-on: https://chrome-internal-review.googlesource.com/272241 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')
-rwxr-xr-xbinary_search_tool/android/boot_test.sh4
-rwxr-xr-xbinary_search_tool/android/interactive_test.sh6
-rwxr-xr-xbinary_search_tool/binary_search_perforce.py4
-rwxr-xr-xbinary_search_tool/binary_search_state.py2
-rwxr-xr-xbinary_search_tool/common/boot_test.sh2
-rwxr-xr-xbinary_search_tool/common/interactive_test.sh6
-rwxr-xr-xbinary_search_tool/sysroot_wrapper/glibc_test_script.sh8
-rwxr-xr-xbinary_search_tool/sysroot_wrapper/test_script.sh6
8 files changed, 19 insertions, 19 deletions
diff --git a/binary_search_tool/android/boot_test.sh b/binary_search_tool/android/boot_test.sh
index 8fec34f2..26095187 100755
--- a/binary_search_tool/android/boot_test.sh
+++ b/binary_search_tool/android/boot_test.sh
@@ -8,8 +8,8 @@
# part of the binary search triage on the Android source tree. It
# waits for the install script to build and install the image, then checks if
# image boots 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).
+# (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125'
+# if it could not determine (does not apply in this case).
#
source android/common.sh
diff --git a/binary_search_tool/android/interactive_test.sh b/binary_search_tool/android/interactive_test.sh
index 99dfd050..16a5753c 100755
--- a/binary_search_tool/android/interactive_test.sh
+++ b/binary_search_tool/android/interactive_test.sh
@@ -10,8 +10,8 @@
# part of the binary search triage on the Android source tree. 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).
+# (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125'
+# if it could not determine (does not apply in this case).
#
source android/common.sh
@@ -36,4 +36,4 @@ while true; do
esac
done
-exit 2
+exit 125
diff --git a/binary_search_tool/binary_search_perforce.py b/binary_search_tool/binary_search_perforce.py
index 2ff60467..3c1e9b51 100755
--- a/binary_search_tool/binary_search_perforce.py
+++ b/binary_search_tool/binary_search_perforce.py
@@ -94,13 +94,13 @@ class BinarySearcher(object):
self.current,
status))
self.logger.LogOutput(message, print_to_console=verbose)
- assert status == 0 or status == 1 or status == 2
+ assert status == 0 or status == 1 or status == 125
self.index_log.append(self.current)
self.status_log.append(status)
bsp = BinarySearchPoint(self.sorted_list[self.current], status, tag)
self.points[self.current] = bsp
- if status == 2:
+ if status == 125:
self.skipped_indices.append(self.current)
if status == 0 or status == 1:
diff --git a/binary_search_tool/binary_search_state.py b/binary_search_tool/binary_search_state.py
index ef276fab..53ba4884 100755
--- a/binary_search_tool/binary_search_state.py
+++ b/binary_search_tool/binary_search_state.py
@@ -284,7 +284,7 @@ class BinarySearchState(object):
status = self.TestScript()
else:
# Install script failed, treat as skipped item
- status = 2
+ status = 125
terminated = self.binary_search.SetStatus(status)
if terminated:
diff --git a/binary_search_tool/common/boot_test.sh b/binary_search_tool/common/boot_test.sh
index f58c345b..2681f561 100755
--- a/binary_search_tool/common/boot_test.sh
+++ b/binary_search_tool/common/boot_test.sh
@@ -8,7 +8,7 @@
# part of the binary search triage on ChromeOS package and object files.
# It waits for the install script to build and install the image, then pings the
# machine. It should return '0' if the test succeeds (the image booted); '1' if
-# the test fails (the image did not boot); and '2' if it could not determine
+# the test fails (the image did not boot); and '125' if it could not determine
# (does not apply in this case).
#
diff --git a/binary_search_tool/common/interactive_test.sh b/binary_search_tool/common/interactive_test.sh
index 7005da36..a52bd2ee 100755
--- a/binary_search_tool/common/interactive_test.sh
+++ b/binary_search_tool/common/interactive_test.sh
@@ -10,8 +10,8 @@
# part of the binary search triage on ChromeOS package and 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).
+# (the image is 'good'); '1' if the test fails (the image is 'bad'); and '125'
+# if it could not determine (does not apply in this case).
#
source common/common.sh
@@ -34,4 +34,4 @@ while true; do
esac
done
-exit 2
+exit 125
diff --git a/binary_search_tool/sysroot_wrapper/glibc_test_script.sh b/binary_search_tool/sysroot_wrapper/glibc_test_script.sh
index 8e9ae8e4..58413ad1 100755
--- a/binary_search_tool/sysroot_wrapper/glibc_test_script.sh
+++ b/binary_search_tool/sysroot_wrapper/glibc_test_script.sh
@@ -19,20 +19,20 @@ board=x86-alex
DUT=172.17.186.180
echo "Cleaning up"
-{ sudo emerge -C cross-i686-pc-linux-gnu/glibc || exit 2; } &>> /tmp/glibc_triage.log
+{ sudo emerge -C cross-i686-pc-linux-gnu/glibc || exit 125; } &>> /tmp/glibc_triage.log
echo "Building"
-{ sudo -E emerge cross-i686-pc-linux-gnu/glibc || exit 2; } &>> /tmp/glibc_triage.log
+{ sudo -E emerge cross-i686-pc-linux-gnu/glibc || exit 125; } &>> /tmp/glibc_triage.log
echo "Building image"
-{ /home/llozano/trunk/src/scripts/build_image --board=${board} test || exit 2; } &>> /tmp/glibc_triage.log
+{ /home/llozano/trunk/src/scripts/build_image --board=${board} test || exit 125; } &>> /tmp/glibc_triage.log
echo "Installing image"
cros flash ${DUT} latest &> /tmp/tmp_cros_flash_result.log
cat /tmp/tmp_cros_flash_result.log >> /tmp/cros_flash_result.log
-grep "Cros Flash completed successfully" /tmp/tmp_cros_flash_result.log || exit 2
+grep "Cros Flash completed successfully" /tmp/tmp_cros_flash_result.log || exit 125
echo "Trying piglit"
diff --git a/binary_search_tool/sysroot_wrapper/test_script.sh b/binary_search_tool/sysroot_wrapper/test_script.sh
index 8b424825..2629a187 100755
--- a/binary_search_tool/sysroot_wrapper/test_script.sh
+++ b/binary_search_tool/sysroot_wrapper/test_script.sh
@@ -16,13 +16,13 @@ echo "State of sets"
wc -l ${bisect_dir}/*_SET
echo "Cleaning up"
-{ /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
+{ /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 125; } &>> /tmp/kernel_triage.log
echo "Building"
-{ /usr/local/bin/emerge-falco =sys-kernel/chromeos-kernel-3_8-3.8.11-r96 || exit 2; } &>> /tmp/kernel_triage.log
+{ /usr/local/bin/emerge-falco =sys-kernel/chromeos-kernel-3_8-3.8.11-r96 || exit 125; } &>> /tmp/kernel_triage.log
echo "Building image"
-{ /home/llozano/trunk/src/scripts/build_image --board=falco test || exit 2; } &>> /tmp/kernel_triage.log
+{ /home/llozano/trunk/src/scripts/build_image --board=falco test || exit 125; } &>> /tmp/kernel_triage.log
echo "Installing image"
cros flash 172.17.187.150 latest &> /tmp/tmp_cros_flash_result.log