Created
August 5, 2022 12:56
-
-
Save progers/998452a15180ae369fee338bb39363fd to your computer and use it in GitHub Desktop.
Git bisect script for running a new test that has been stashed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bisect-stash-build-run.sh | |
----------8<---------- | |
#!/bin/bash | |
git stash apply || exit 125 | |
# build the test | |
# for a chromium/blink unittest, this is: | |
# ( echo n | gclient sync ) || exit 125 | |
# autoninja -C out/Debug blink_unittests || exit 125 | |
# run the test | |
# for a chromium/blink, this is: | |
# out/Debug/blink_unittests --gtest_filter=... | |
rv=$? | |
git reset --hard HEAD | |
exit $rv | |
----------8<---------- | |
To use, add your new test and then stash it with "git stash". | |
Then, use git bisect: | |
git bisect start | |
git bisect good <revision> | |
git bisect bad <revision> | |
git bisect run bisect-stash-build-run.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment