小编Raj*_*ury的帖子

Gtest discovery_tests 在 Github Actions 中失败:进程因超时而终止

我将 google-test(gtest) 与 CMake 结合使用,并将单元测试作为适用于 Linux 和 Mac 的 GitHub ci 作业运行。Linux 作业成功通过。但是,我在 mac runner 上遇到错误。错误是

CMake Error at /usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:77 (message):
  Error running test executable.

    Path: '/Users/runner/work/splitwebp/build/test/splitwebp_tests'
    Result: Process terminated due to timeout
    Output:
      

Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)
Run Code Online (Sandbox Code Playgroud)

这是CMakelists.txt测试目录

# CMake config file for unit tests
# Requiring V 3.10 for gtest_discover_tests
cmake_minimum_required(VERSION 3.10)
find_package(OpenCV REQUIRED)
enable_testing()

# finds all .cpp files under this directory (./test) and add them to executable
file(GLOB_RECURSE tests "*.cpp") …
Run Code Online (Sandbox Code Playgroud)

macos cmake googletest ctest github-actions

3
推荐指数
1
解决办法
3609
查看次数

标签 统计

cmake ×1

ctest ×1

github-actions ×1

googletest ×1

macos ×1