gpt4 book ai didi

bazel - 如何为 bazel 测试指定自定义超时

转载 作者:行者123 更新时间:2023-12-04 14:54:16 56 4
gpt4 key购买 nike

bazel test命令对标记为 size = small 的测试使用默认超时 75 秒在我的设置中(版本 0.12.0)(而 documentation 提到这是 60 秒)

有没有办法在 bazel 上提供自定义超时时间,比如 10 秒命令行,以便如果测试挂起它会更快地终止?

最佳答案

我希望我没有误读这个问题,但这听起来确实像是您在寻找 --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 来节省一些输入时间。 .

关于bazel - 如何为 bazel 测试指定自定义超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50877472/

56 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com