c++ - 如何使用 BUCK 仅运行特定的 C++ gtest

标签 c++ unit-testing googletest buck

如果我有如下测试

TEST(One, A) { ... }
TEST(Two, B) { ... }

如何使用buck test 只运行One.A?我希望能够做到

buck test something -- --gtest_filter=One.A

但这似乎行不通。 --include--filter

都没有

最佳答案

因此,据我所知,Buck 不直接支持它。但是,您应该能够做的一件事是

buck run//foo/bar:baz -- --gtest_filter=One.a

这将为您提供 gtest gui,而不是 buck gui,但它应该可以工作。我将打开一个 github 问题(如果我们还没有)看看如何将它集成到内部运行器中,因为它也是我想要一段时间的功能

编辑:https://github.com/facebook/buck/issues/1688

关于c++ - 如何使用 BUCK 仅运行特定的 C++ gtest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47382675/

相关文章:

c++ - 我应该将分配器作为函数参数传递吗? (我对分配器的误解)

c# - 如何在 Moq Func<object, Class> Property { get; 中进行模拟}

c++ - 从googletest中的派生夹具派生夹具

c++ - 通过重复的操作序列简化 GTest 用例

python - 在 C++ 中嵌入 Cython 类方法

c++ - 将 cURL 内容结果保存到 C++ 中的字符串中

c++ - double 到 unsigned int/char

android - 无法在android上运行robotium单元测试应用程序

c# - 如何对 POST 方法进行单元测试

googletest - googletest 中的测试用例超时