0

我发现了一个错误,我想弄清楚它是从哪里引入的。我做的下一件事是创建一个当前失败但在修复错误后应该通过的单元测试。我在 HEAD 中创建了一个单元测试,可以从命令行运行它。但问题是,如果我检查除 HEAD 之外的任何内容,则该单元测试将不存在。即使它只存在于 HEAD 中,我如何才能在每次结账时对它进行 bisect 运行此单元测试?

以下是我的一些想法:

  1. 我可以让 bisect script 樱桃挑选(不提交)单元测试。
  2. 如果我避免提交测试,那么测试将被带到每次结帐时(我认为)。

有一个更好的方法吗?

编辑:我正在使用 Java。

4

1 回答 1

0

Here's a suggestion: write your test so that it doesn't depend on file-paths in your project. Go ahead and version it so that you have a record in history. Then copy the test outside of your project folder, and pass it to bisect run as

git bisect run ../my-test-script
于 2014-04-17T21:00:00.280 回答