{"thread":{"id":"60975","subject":"script to pre-build all commits in a git-bisect, and use them during testing","startedAt":"2024-02-21T22:58:09Z","lastAt":"2024-02-21T23:20:28Z","messageCount":2,"participants":["Britton Kerin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"489114","messageId":"CAC4O8c-tgDQ42upWorMi3Cw+KdPoHT2YxvZEirt_dtjQXreXAw@mail.gmail.com","threadId":"60975","inReplyTo":null,"subject":"script to pre-build all commits in a git-bisect, and use them during testing","fromName":"Britton Kerin","fromEmail":"britton.kerin@gmail.com","sentAt":"2024-02-21T22:57:55Z","receivedAt":"2024-02-21T22:58:09Z","isPatch":false,"sender":{"key":"britton.kerin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7434164?v=4"},"body":"Problem: it's annoying to have to build each commit when\ngit-bisect'ing for something that isn't being tested automatically (so\nno git bisect run).\n\nSolution: https://github.com/bkerin/git-batch-bisect\n\nIt has an interface almost exactly like native git-bisect so it's\nsuper easy to learn but it handles a couple additional commands to\ncreate worktrees for all the commits, parallel build, and test in\nthem.\n\nFrom the README:\n\n     git batch-bisect start bad_commit good_commit\n     git batch-bisect runinall 'autoreconf --install && ./configure && make'\n     git batch-bisect runincurrent ./test_program\n     git batch-bisect good\n     git batch-bisect runincurrent ./test_program\n     git batch-bisect bad\n     # etc.\n\nI'd be grateful for any feedback on this script.  I don't actually\nbisect all that often, so it's only tested on one real-world project\nso far.  I thought it might live in contrib someday if it's useful to\nanyone else.\n\nBritton\n"},{"id":"489116","messageId":"xmqqo7c9l809.fsf@gitster.g","threadId":"60975","inReplyTo":"CAC4O8c-tgDQ42upWorMi3Cw+KdPoHT2YxvZEirt_dtjQXreXAw@mail.gmail.com","subject":"Re: script to pre-build all commits in a git-bisect, and use them during testing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-21T23:20:22Z","receivedAt":"2024-02-21T23:20:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Britton Kerin <britton.kerin@gmail.com> writes:\n\n> Problem: it's annoying to have to build each commit when\n> git-bisect'ing for something that isn't being tested automatically (so\n> no git bisect run).\n>\n> Solution: https://github.com/bkerin/git-batch-bisect\n\nSo, because \"git bisect run\" would not be usable for whatever reason\nto run a \"build and then test\" from the command line, you would\nbuild all revisions using\n\n    git batch-bisect runinall 'autoreconf --install && ./configure && make'\n\nbefore starting to test any revision, and then after building\neverything, you would do:\n\n    git batch-bisect runincurrent ./test_program\n    git batch-bisect good\n    git batch-bisect runincurrent ./test_program\n    git batch-bisect bad\n    ...\n\nwhere ./test_program cannot signal if it is good or bad mechanically\n(e.g., by exiting with non-zero status for failure) but the testers\nneed to judge the good/bad manually before they can say \"git\nbatch-bisect good/bad\", I presume.\n\nIt's an interesting workaround for a test program that cannot be\nautomated.  You are willing to waste CPU cycles and diskspace to\nbuild upfront and hold the build products for all N revisions in the\nrange, where with bisection you would have to build far fewer\nrevisions (which is the point of bisection), to optimize for\ndeveloper/tester latency, which tends to be more expensive.  The\ntrade-off may make good sense.\n"}]}