aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool
AgeCommit message (Collapse)Author
2016-12-01[binary search tool] Allow non-flashing images to be fails.Caroline Tice
Currently if an image is so bad that it can't be flashed, it gets marked as 'skipped', which is different from bad/failed. This can cause the binary search to never find the bad image. We need an option to treat a non-flashing image as a failure. That's what this CL does. BUG=None TEST=Tested by Manoj: without this change, binary search failed to find any bad packages, but with this change it worked. Change-Id: Ib223338a1820314e85352827857fb8f3ba1ed73a Reviewed-on: https://chrome-internal-review.googlesource.com/307824 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Manoj Gupta <manojgupta@google.com>
2016-09-28[bisection tool] Don't make failure to flash bad image fatal error.Caroline Tice
Currently during initial setup, if the known 'bad' image fails to flash onto the device, the user is given the option to 'skip'. This causes the entire bisection to fail/stop. This CL changes the skip to allow bisection to continue (it is not unreasonable for a bad image to fail to flash). BUG=chromium:641539 TEST=None Change-Id: Iddc5312ecf593192d563766d677e8d401824ae7d Reviewed-on: https://chrome-internal-review.googlesource.com/290617 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com> Reviewed-by: Ting-Yuan Huang <laszio@google.com>
2016-09-14[bisection] Fix various minor bugs in Android bisection.Caroline Tice
Recent testing has found a few minor bugs in the Android bisection tool. This CL fixes those bugs. BUG=chromium:646948 TEST=Ran full Android bisection. Change-Id: I5b228105ec719db89f0ab34b29fde11dbb1e5074 Reviewed-on: https://chrome-internal-review.googlesource.com/287195 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com>
2016-08-18binary search tool: Update ChromeOS Object bisectorCassidy Burden
Update ChromeOS Object bisector to work with new compiler wrapper. This new compiler wrapper means we can now do incremental switches and triage builds that skip compiler calls. TEST=Run full bisection CQ-DEPEND=CL:368231 Change-Id: If34877519ad6dfe3189a5e934e174fd13dae5c89 Reviewed-on: https://chrome-internal-review.googlesource.com/274236 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-16binary search tool: Run tc_pyformat on all python scriptsCassidy Burden
REFACTOR WARNING! Run tc_pyformat on all python scripts. TEST=Run unit tests, Android bisection Change-Id: I9624e7be2670bdb29bcdb59404bf9e8c2f7d81c5 Reviewed-on: https://chrome-internal-review.googlesource.com/274615 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-12binary search tool: Add sample NDK bisectionCassidy Burden
Add sample NDK bisection that can be given to those inside or outside of Google. This sample includes a compressed source tree of the Teapot sample NDK app, and a script showing the full setup and process for running the bisection tool. It also includes a couple patches that show the necessary changes to the build system, and the "compiler error" that we will be bisecting. TEST=Run DO_BISECTION.sh Change-Id: I11279fe33e833b0dfe2fb147fde6f46b347d62be Reviewed-on: https://chrome-internal-review.googlesource.com/274145 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-08-11binary search tool: Make 1st resumed iteration non-incrementalCassidy Burden
If resuming a bisection, we want to make sure all current good items are switched to good and all current bad items are switched to bad. This is so the bisection tool will resume in a known, stable state. Incremental builds are essentially diffs from previous builds, and the base environment may have changed since the last execution. TEST=Add test code, run unit tests Change-Id: I9ac855efbcfb48bc86f245f33ee29d0c38aa7af9 Reviewed-on: https://chrome-internal-review.googlesource.com/274175 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-10binary search tool: Add maintenance documentCassidy Burden
Change-Id: I2c7e10f4f0622569490f97fd9406e1deb5940041 Reviewed-on: https://chrome-internal-review.googlesource.com/273451 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-09binary search tool: Fix edge cases in compiler wrapperCassidy Burden
Fix compiler wrapper edge cases that exist with the NDK and ChromeOS build systems. For ChromeOS we support the -MMD flag when caching dependency files. For NDK we support calls to compiler that give no output file (these calls are meant to check compiler capabilities). TEST=NDK bisection and ChromeOS population Change-Id: Ic23bc7876e9844eacb106d49082e0509ea1ee31b Reviewed-on: https://chrome-internal-review.googlesource.com/273985 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-09binary search tool: Rename install to test_setupCassidy Burden
Refactor warning! Rename install script to be test_setup script. TEST=Run unit tests Change-Id: Iab7e01136fdcf2dedbfc94ece6ddb4b4fa3c0f68 Reviewed-on: https://chrome-internal-review.googlesource.com/273484 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-05binary search tool: Add option to always run compilerCassidy Burden
Similar to sysroot_wrapper, add option that will always call compiler during triage stage. This option is safer, but much slower. TEST=Test with NDK app with missing side effects Change-Id: I242d7267c52e50989bcc5968f132956ba1cd3105 Reviewed-on: https://chrome-internal-review.googlesource.com/273457 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-05binary search tool: Clean up outputCassidy Burden
Make output of binary search tool less confusing, provide PROGRESS output for each verification run, make output for found items cleaner. TEST=Run unit tests Change-Id: I65628fb7147419ad5381726217e649a3e16a1cab Reviewed-on: https://chrome-internal-review.googlesource.com/273446 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-05binary search tool: Show how to reconstruct bisection envCassidy Burden
When bisect.py finishes, give users instructions on how to reconstruct bisection environment. This essentially gives the same setup.sh call that bisect.py uses. Change-Id: I060a4f3397e7d83d83321d25e751d6c47951436b Reviewed-on: https://chrome-internal-review.googlesource.com/273407 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-04binary search tool: Properly cache all side effectsCassidy Burden
Properly cache all side effects in compiler wrapper. Extract some common caching logic to their own functions (cache_file/restore_file). TEST=Full Android bisection, and full NDK bisection with dwo files Change-Id: I4c3be2cb5dae1922c145ba6be85ae65d1ed5cda2 Reviewed-on: https://chrome-internal-review.googlesource.com/273115 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-04binary search tool: Support @file compiler argumentsCassidy Burden
Gradle passes arguments to gcc/clang by using the @file argument. Implement expansion of this argument so that bisect_driver can analyze all arguments being sent to the compiler. TEST=Tested with NDK sample app Change-Id: I1e1dae001a062c118b6d5c36e367612c9e4116b7 Reviewed-on: https://chrome-internal-review.googlesource.com/272935 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-03binary search tool: Change verify_level to booleanCassidy Burden
Previously, the user could run multiple levels of verification. This would essentially repeat verification multiple times. It's unsure why a user would want to set verify_level to any value other than 0 or 1. Thus verify_level is more appropriate as a boolean. TEST=Run unit tests Change-Id: Id8832c54e2733881bf23f48af2a3b4c294117d1c Reviewed-on: https://chrome-internal-review.googlesource.com/272766 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-03binary search tool: Use full obj path with compiler wrapperCassidy Burden
In order to support the NDK, use absolute paths for object files. TEST=Run full Android bisection Change-Id: I588230fa5cd521cd7c7d48b87e8bab3e3b09b1aa Reviewed-on: https://chrome-internal-review.googlesource.com/272756 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-02binary search tool: Add android bisector documentationCassidy Burden
Change-Id: I8f9c954accdac769d2a696f31fb1d90d50264eaa Reviewed-on: https://chrome-internal-review.googlesource.com/272011 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-01binary search tool: Add android bisector to bisect.pyCassidy Burden
Add android bisector implementation to bisect.py. Additionally add simple cleanup.sh script. TEST=Tested with full android bisection Change-Id: Ib6c6ea85614dbe3d54865d9695863ee625588a2d Reviewed-on: https://chrome-internal-review.googlesource.com/272166 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-01binary search tool: Change skip exit status to 125Cassidy Burden
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>
2016-08-01binary search tool: Fix off by one bug, add stress testsCassidy Burden
Revert change that introduced bug when bad item is very last item in list. Add tests that stress limits of binary search tool and try to look for these off-by-one errors. Specifically one test checks for the bad item being in every index of the binary search. Another tests checks for if every single item is bad. TEST=Add two new stress tests, run all unit tests Change-Id: I2d5a0bda035b2c2b4994b0378aa416da19db651d Reviewed-on: https://chrome-internal-review.googlesource.com/271916 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-08-01binary search tool: export TRIAGE stage for object bisectorCassidy Burden
Change-Id: I3c026f070f702cad1ab061a3ec20f19668775e8e Reviewed-on: https://chrome-internal-review.googlesource.com/272009 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-29binary search tool: Add file locking to compiler wrapperCassidy Burden
Because make can run with arbitrary number of jobs, there's potential race conditions with the compiler wrapper's file operations. Replace all open calls with function that locks files using fnctl module. Additionally fix small formatting errors CQ-DEPEND=CL:*270783 Change-Id: I4b94bfe3c0a5d7203f78e87130b7c4d71bc8e1c0 Reviewed-on: https://chrome-internal-review.googlesource.com/271747 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-29binary search tool: Add compiler wrapper for Android bisectionCassidy Burden
Add compiler wrapper similar to ChromeOS object bisector's compiler wrapper. bisect_driver.py is a modified version of bisect.py from the ChromeOS sysroot_wrapper. compiler_wrapper.py is a simple skeleton script used to invoke bisect_driver, and it is meant to be replaced by a more robust compiler wrapper. TEST=Populated android objects and triaged CQ-DEPEND=CL:*270730 Change-Id: I4dfc676f6b659c2da8dbd01fd858c477ffbdeb9f Reviewed-on: https://chrome-internal-review.googlesource.com/270783 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-28binary search tool: Add android test scriptsCassidy Burden
Add android test scripts: boot test and interactive test. Boot test waits for device to boot up and reach homescreen. Interactive test waits for device to boot and asks user if the image is good or bad. TEST=Run full bisection with boot test, test code paths with interactive test Change-Id: I04490da381964ca157f72f70cca49213e0e827c0 Reviewed-on: https://chrome-internal-review.googlesource.com/271975 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-28binary search tool: Add android get_initial_items scriptCassidy Burden
This script will simply output the list of all files in the good object cache. TEST=Used with test android bisection Change-Id: I5caa7b3d1372d0b5ee046f2ceb814c88122d5ec6 Reviewed-on: https://chrome-internal-review.googlesource.com/271947 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-28binary search tool: Add android switch scriptsCassidy Burden
Add switch scripts for android bisector. Each script hardlinks files from GOOD/BAD cache into working tree. ln/touch are invoked via xargs to allow easier input parsing and parallel execution. TEST=Tested various code paths and tried with prototype bisector Change-Id: I9f52358737e8d18486287eb9e4d30bf3e1ad13ea Reviewed-on: https://chrome-internal-review.googlesource.com/271725 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-28binary search tool: Add android install scriptCassidy Burden
Add install script for android bisector. This script will build android and attempt to flash the newly built image. If flashing fails, the install script will ask the user for help. TEST=Tested each code path Change-Id: I89845edd8a2bafedc9e6cabffe7bf92f2f48bc0d Reviewed-on: https://chrome-internal-review.googlesource.com/271482 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-27binary search tool: Alert user if --file_args requiredCassidy Burden
Check for OS Error E2BIG when running switch script. If this happens that means that --file_args is required. TEST=Test with list of android objects, properly fails Change-Id: If795ea5f45956ed0e5dd5eb6a9852f02d9f5978f Reviewed-on: https://chrome-internal-review.googlesource.com/271688 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-27binary search tool: Fix linting errorCassidy Burden
TEST=Run unit tests Change-Id: I235148ca88e3f86f8bb00467a2b01ebfa99b0a88 Reviewed-on: https://chrome-internal-review.googlesource.com/271528 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-27[crosperf] Clean up exceptions.Caroline Tice
Found all instances of 'raise Exception' and changed them to raise something slightly more specific. Changed a few 'except Exception' statements appropriately as well. BUG=chromium:566255 TEST=None Change-Id: If2666bd55838342bc71431e5e6ab2157c2c9e125 Reviewed-on: https://chrome-internal-review.googlesource.com/270731 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com>
2016-07-26binary search tool: Add setup script for android bisectorCassidy Burden
Add setup script for android bisector. This setup script will: 1. Generate all necessary variables for the switch/test/etc. scripts and put them in a common.sh file. 2. Ensure the GOOD/BAD object caches exist, and have the same objects lists 3. Make sure that the android build environment is properly configured (with build/envsetup.sh and lunch) Change-Id: Id2343b5d4bbc51b06fab261863ccbe7c507c33b4 Reviewed-on: https://chrome-internal-review.googlesource.com/270976 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-26binary search tool: Fix edge case with noincremental and pruneCassidy Burden
Fix edge case where not all items were sent to switch_to_good script when noincremental and prune were both set. Pruning progressively narrows down the total number of items being searched across because some items can be assumed good. This fix ensures that these "known good" items are also sent to the switch script if noincremental is set. TEST=Add unit test for this case, run other tests Change-Id: I1145f6eea224f06ceb2352ec77e17e849d489606 Reviewed-on: https://chrome-internal-review.googlesource.com/270718 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-26binary search tool: Provide temp files that hold GOOD/BAD setsCassidy Burden
Provide temp files to scripts ($BISECT_GOOD_SET, $BISECT_BAD_SET) that provide a full listing of the items in the good set and items in the bad set. This can be used for debugging purposes or so scripts can analyze the state of the current binary search iteration. TEST=Add unit test that utilizes these files Change-Id: I32bc393644f1cb998c2d818a9026486ef83cc4b8 Reviewed-on: https://chrome-internal-review.googlesource.com/270730 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com> Reviewed-by: Han Shen <shenhan@google.com>
2016-07-25[toolchain-utils] Finish switching utils/ to cros_utils/.Caroline Tice
This CL finishes switching the subdirectory from 'utils' to 'cros_utils'. It changes all the remaining import statements to use 'cros_utils'; it removes the 'cros_utils' symlink, and it renames the 'utils' subdirectory to 'cros_utils'. BUG=chromium:568195 TEST=ran crosperf & binary search tool unittests. Change-Id: I7427f8bfb2ddac3a4b6108e46782039059684382 Reviewed-on: https://chrome-internal-review.googlesource.com/270396 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-22binary search tool: Print out elapsed time every iterationCassidy Burden
Print out time since execution has begun every progress update. Also give final execution time after tool completes. Change-Id: Ibba29feac42c8b637b1d3595a381ad3b4e9e974d Reviewed-on: https://chrome-internal-review.googlesource.com/270695 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-19binary search tool: Add new common hash_test.shCassidy Burden
Add new test script for all bisecting tools. This test simply runs a checksum on a given file. If the checksum fails the image is "bad", otherwise the image is "good". This test replaces the less generic system test for cros_pkg (cros_pkg/testing_test.sh). TEST=Run system test for package bisector with hash_test.sh Change-Id: Ie1358101386ec2a04a077c8d81e73706f28112c0 Reviewed-on: https://chrome-internal-review.googlesource.com/270095 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-12binary search tool: Update found_items when prune is not setCassidy Burden
Previously when prune was not set found_items would not be updated with the single bad item found. This commit fixed this edge case and adds a unit test for it. TEST=Run unit tests Change-Id: Iac56c53fd4de97fa12b14fc9ea1e05d021cc6495 Reviewed-on: https://chrome-internal-review.googlesource.com/268725 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Han Shen <shenhan@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-08binary search tool: Add more unit testsCassidy Burden
Add tests for failed verification and iterations limit. Change-Id: I22c26ed1c5f779ee5f81256c2315a6c523e1dfa8 Reviewed-on: https://chrome-internal-review.googlesource.com/268243 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Han Shen <shenhan@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-07Add docstrings to binary search state methodsCassidy Burden
Change-Id: Iba4bf1e8df155a38c4c12fa488bee7df3ffd0291 Reviewed-on: https://chrome-internal-review.googlesource.com/268538 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Han Shen <shenhan@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-07-01binary search tool: Fix typos and small output errorsCassidy Burden
Change-Id: I0859c43b3bfe8917ebf1e5337f2e39cbb2a55fa0 Reviewed-on: https://chrome-internal-review.googlesource.com/268247 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-07-01binary search tool: (Refactor) Extract common scripts into common folderCassidy Burden
Refactor warning! Move install.sh, boot_test.sh, and interactive_test.sh into common folder so they can be shared by both package and object bisectors. To allow this sharing, sysroot_wrapper now has a setup script similar to cros_pkg. All scripts now source common/common.sh. TEST=Run unit tests, run system tests, run couple iterations of install script for both bisectors. Change-Id: I9e164b4e6b842ff321c2400201e6ac0984f99088 Reviewed-on: https://chrome-internal-review.googlesource.com/268027 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-30binary search tool: Add object bisecting to bisect.pyCassidy Burden
Add object file bisecting to bisect.py. This is the frontend to the sysroot_wrapper bisection scripts. This bisection mode takes the following arguments: board, remote IP, package to bisect, and optionally the directory for the good/bad build trees. Adds default install/test scripts to sysroot_wrapper (similar to default scripts in cros_pkg) to support this bisection mode. TEST=Run unit tests and system test with cryptohome package CQ-DEPEND=CL:*267995 Change-Id: I1e9166b753f78ca7bdcf6ddbd056af62bc03923b Reviewed-on: https://chrome-internal-review.googlesource.com/268035 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-30binary search tool: Add pretty printing of arguments to bisect.pyCassidy Burden
Add pretty printing of arguments at beginning of bisect.py. Additionally extract argument overriding logic into helper function in base class. TEST=Try various argument overrides and verify output Change-Id: I15b33ee944356e9db880a3518bcea48e022f4442 Reviewed-on: https://chrome-internal-review.googlesource.com/267995 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-29Add README for bisect.pyCassidy Burden
Change-Id: I9bc78a3a69609354fe88ad5123ebb748e211f1e6 Reviewed-on: https://chrome-internal-review.googlesource.com/267412 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-29Add argument overriding to bisect.pyCassidy Burden
Add the ability to override the default arguments given to the package and object bisecting tools. This allows users to specify their own test/install/etc. script but keep the others the same. Example 1 (do boot test instead of interactive test): ./bisect.py package daisy 172.17.211.182 --test_script=cros_pkg/boot_test.sh Example 2 (do package bisector system test instead of interactive test): ./bisect.py package daisy 172.17.211.182 \ --test_script=cros_pkg/testing_test.sh --install_script="" TEST=Run unit tests and ran above examples among others (such as overriding verbose, prune, etc. options) CQ-DEPEND=CL:*266996 Change-Id: I5ee24826d4d7e22e7328ce98c6b8cda9917df533 Reviewed-on: https://chrome-internal-review.googlesource.com/266305 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-28Add common module for binary search toolCassidy Burden
common module holds common logic between bisect and binary_search_state for adding utils to PYTHONPATH and for building the argument parser. TEST=Run unit tests, run cros_pkg system test Change-Id: I4085b28de011132c53b8fddf06e8745042ef8ea2 Reviewed-on: https://chrome-internal-review.googlesource.com/266996 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
2016-06-24binary search tool: Enforce execution from root directoryCassidy Burden
Both cros_pkg and sysroot_wrapper rely on the current working directory being toolchain-utils/binary_search_tool. bisect.py will now enforce this by cd'ing to this directory before execution. TEST=Run unit tests and cros_pkg CQ-DEPEND=CL:*266365 Change-Id: Ie30272ba31cd80a1b2c715e0f9a42a4e26889f16 Reviewed-on: https://chrome-internal-review.googlesource.com/266329 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-24binary search tool: Move root path of cros_pkg execution, rename scriptsCassidy Burden
Update cros_pkg scripts and bisect.py so that the package bisector needs to be run from binary_search_tool/ instead of binary_search_tool/cros_pkg. This fits with how sysroot_wrapper implements its scripts. Also rename all cros_pkg scripts to remove cros_pkg prefix and remove undo_eclean.py. TEST=Run unit tests and run interactive/testing cros_pkg test Change-Id: I2781319934b704b91346745ae2d4d916fee35d02 Reviewed-on: https://chrome-internal-review.googlesource.com/266365 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
2016-06-22Add initial unified bisection scriptCassidy Burden
Add new script for unifying package and object bisection script interfaces. Currently only package bisection is implemented. TEST=Add unit test, test cros_pkg with testing script and interactive script Change-Id: I7491e3fb73eae863e24de3869092cfbf9df56c8d Reviewed-on: https://chrome-internal-review.googlesource.com/266096 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>