如何为bazel test指定自定义超时时间

13
在我的设置(版本0.12.0)中,bazel test命令对标记为size = small的测试使用默认超时时间为75秒(而文档中将其称为60秒)。
是否有一种方法可以在bazel命令行上提供自定义超时时间,比如10秒,以便如果测试挂起,则更快地终止它?
1个回答

15

我希望我没有误读问题,但这真的听起来像是你在寻找--test_timeout选项:

  --test_timeout
    (a single integer or comma-separated list of 4 integers; default: "-1")
    Override the default test timeout values for test timeouts (in secs). If a 
    single positive integer value is specified it will override all 
    categories.  If 4 comma-separated integers are specified, they will 
    override the timeouts for short, moderate, long and eternal (in that 
    order). In either form, a value of -1 tells blaze to use its default 
    timeouts for that category.

如果您想每次使用相同的选项,可以使用 Bazelrc 来节省一些输入。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接