File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,39 @@ It is safer if both "test.sh" and "check_test_case.sh" are
294
294
outside the repository to prevent interactions between the bisect,
295
295
make and test processes and the scripts.
296
296
297
+ * Automatically bisect with temporary modifications (hot-fix):
298
+ +
299
+ ------------
300
+ $ cat ~/test.sh
301
+ #!/bin/sh
302
+
303
+ # tweak the working tree by merging the hot-fix branch
304
+ # and then attempt a build
305
+ if git merge --no-commit hot-fix &&
306
+ make
307
+ then
308
+ # run project specific test and report its status
309
+ ~/check_test_case.sh
310
+ status=$?
311
+ else
312
+ # tell the caller this is untestable
313
+ status=125
314
+ fi
315
+
316
+ # undo the tweak to allow clean flipping to the next commit
317
+ git reset --hard
318
+
319
+ # return control
320
+ exit $status
321
+ ------------
322
+ +
323
+ This applies modifications from a hot-fix branch before each test run,
324
+ e.g. in case your build or test environment changed so that older
325
+ revisions may need a fix which newer ones have already. (Make sure the
326
+ hot-fix branch is based off a commit which is contained in all revisions
327
+ which you are bisecting, so that the merge does not pull in too much, or
328
+ use `git cherry-pick` instead of `git merge`.)
329
+
297
330
* Automatically bisect a broken test case:
298
331
+
299
332
------------
You can’t perform that action at this time.
0 commit comments