* script to pre-build all commits in a git-bisect, and use them during testing
@ 2024-02-21 22:57 Britton Kerin
2024-02-21 23:20 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Britton Kerin @ 2024-02-21 22:57 UTC (permalink / raw)
To: git
Problem: it's annoying to have to build each commit when
git-bisect'ing for something that isn't being tested automatically (so
no git bisect run).
Solution: https://github.com/bkerin/git-batch-bisect
It has an interface almost exactly like native git-bisect so it's
super easy to learn but it handles a couple additional commands to
create worktrees for all the commits, parallel build, and test in
them.
From the README:
git batch-bisect start bad_commit good_commit
git batch-bisect runinall 'autoreconf --install && ./configure && make'
git batch-bisect runincurrent ./test_program
git batch-bisect good
git batch-bisect runincurrent ./test_program
git batch-bisect bad
# etc.
I'd be grateful for any feedback on this script. I don't actually
bisect all that often, so it's only tested on one real-world project
so far. I thought it might live in contrib someday if it's useful to
anyone else.
Britton
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: script to pre-build all commits in a git-bisect, and use them during testing
2024-02-21 22:57 script to pre-build all commits in a git-bisect, and use them during testing Britton Kerin
@ 2024-02-21 23:20 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2024-02-21 23:20 UTC (permalink / raw)
To: Britton Kerin; +Cc: git
Britton Kerin <britton.kerin@gmail.com> writes:
> Problem: it's annoying to have to build each commit when
> git-bisect'ing for something that isn't being tested automatically (so
> no git bisect run).
>
> Solution: https://github.com/bkerin/git-batch-bisect
So, because "git bisect run" would not be usable for whatever reason
to run a "build and then test" from the command line, you would
build all revisions using
git batch-bisect runinall 'autoreconf --install && ./configure && make'
before starting to test any revision, and then after building
everything, you would do:
git batch-bisect runincurrent ./test_program
git batch-bisect good
git batch-bisect runincurrent ./test_program
git batch-bisect bad
...
where ./test_program cannot signal if it is good or bad mechanically
(e.g., by exiting with non-zero status for failure) but the testers
need to judge the good/bad manually before they can say "git
batch-bisect good/bad", I presume.
It's an interesting workaround for a test program that cannot be
automated. You are willing to waste CPU cycles and diskspace to
build upfront and hold the build products for all N revisions in the
range, where with bisection you would have to build far fewer
revisions (which is the point of bisection), to optimize for
developer/tester latency, which tends to be more expensive. The
trade-off may make good sense.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-21 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 22:57 script to pre-build all commits in a git-bisect, and use them during testing Britton Kerin
2024-02-21 23:20 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).