yutotnh / spirit

モータードライバ用ライブラリ

Home Page:https://yutotnh.github.io/spirit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: build-and-test (windows-latest) が間欠で失敗することがある

yutotnh opened this issue · comments

バグの説明

build-and-test (windows-latest) のように、間欠でフェイルすることがある

ローカルでctestを実施した時は起こらないが、GitHub Actionsでたまに起こる

Thu, 09 Mar 2023 16:16:17 GMT
LINK : warning LNK4044: unrecognized option '/-coverage'; ignored [D:\a\spirit\spirit\build\tests\integration_test.vcxproj]
Thu, 09 Mar 2023 16:16:31 GMT
  integration_test.vcxproj -> D:\a\spirit\spirit\build\tests\Debug\integration_test.exe
Thu, 09 Mar 2023 16:16:37 GMT
  CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/GoogleTestAddTests.cmake:112 (message):
Thu, 09 Mar 2023 16:16:37 GMT
    Error running test executable.
Thu, 09 Mar 2023 16:16:37 GMT
  
Thu, 09 Mar 2023 16:16:37 GMT
      Path: 'D:/a/spirit/spirit/build/tests/Debug/integration_test.exe'
Thu, 09 Mar 2023 16:16:37 GMT
      Result: Process terminated due to timeout
Thu, 09 Mar 2023 16:16:37 GMT
      Output:
Thu, 09 Mar 2023 16:16:37 GMT
        
Thu, 09 Mar 2023 16:16:37 GMT
  
Thu, 09 Mar [202](https://github.com/yutotnh/spirit/actions/runs/4376455520/jobs/7658592081#step:3:203)3 16:16:37 GMT
  Call Stack (most recent call first):
Thu, 09 Mar 2023 16:16:37 GMT
    C:/Program Files/CMake/share/cmake-3.25/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)

対策は set_tests_properties(my_test PROPERTIES TIMEOUT 30)のようにすればよいらしい?

再現手順

  1. ...
  2. ...

期待した動作

環境

  • OS: [e.g. Arm Mbed OS 6]
  • Version [e.g. v6.15]
  • Device [e.g. LPC1768]

その他

Google Testのデフォルトの20秒でタイムアウトしているが、他のPASSしたテスト(build-and-test (windows-latest)) だと、1秒で終わっていたりするので、ソースコードがなにかおかしいのかもしれなく、単純にタイムアウトの時間を延ばすだけではだめかもしれない

Sat, 28 Jan 2023 13:46:40 GMT
LINK : warning LNK4044: unrecognized option '/-coverage'; ignored [D:\a\spirit\spirit\build\tests\integration_test.vcxproj]
Sat, 28 Jan 2023 13:46:41 GMT
  integration_test.vcxproj -> D:\a\spirit\spirit\build\tests\Debug\integration_test.exe
Sat, 28 Jan 2023 13:46:43 GMT
  Building Custom Rule D:/a/spirit/spirit/tests/CMakeLists.txt

最近はフェイルしなくなりましたので、Closeします

久しぶりに現象がでました。
一応改めてopenします

https://github.com/yutotnh/spirit/actions/runs/5785020803/job/15676857951?pr=262