jenkinstest我有一個 Jenkins 專案,只要在相關 GitHub 存盤庫的分支上推送新內容,就會觸發一項作業。
具體是做什么作業的?Debug它在和Release(x86 和 x64)上構建 Visual Studio 解決方案。所以,它運行MSBuild.exe了四次。之后,它使用utilities_test.exe可執行檔案運行 Google 測驗命令。
這些是在第一步執行的命令:
echo "Building solution file on Debug x64"
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe" "D:\Jenkins\workspace\CFT_TCA_IMS\SAB_Test\Repository\Utilities\solution_windows\utilities.sln" /p:Configuration="Debug" /p:Platform="x64"
IF %ERRORLEVEL% EQU 0 (echo "Build status of the solution file with <Debug x64> configuration is PASSED") Else (echo "Build status of the solution file with <Debug x64> configuration is FAILED")
(每個平臺還有三個批處理腳本)。接下來的測驗如下所示:
echo off
echo "Running test on Debug x64"
"D:\Jenkins\workspace\CFT_TCA_IMS\SAB_Test\Repository\Utilities\solution_windows\x64\Debug\utilities_test.exe" --gtest_filter=CategoryName.MyTest
exit 0
一切似乎都很好。構建程序是在推送時觸發的,測驗似乎通過了,但是有一個問題。我還使用了 Jenkins 的日志決議器,在Post-build Actions中,我添加了一個控制臺輸出(構建日志)決議操作,它使用如下所示的專案規則:
info /0 Error/
info /0 Warning/
info /(?i)errorreport/
error /(?i)error/
error /(?i)failed/
warning /(?i)warning/
info /(?i)building/
info /(?i)done/
正因為如此,我的構建似乎并沒有停止。構建我的解決方案通常需要大約 2-3 分鐘,但我已經等了 20 分鐘,但什么也沒發生。
解決方案正在構建,測驗通過,但構建程序不會停止。我的控制臺日志的最后輸出是:
13:35:10 Note: Google Test filter = CategoryName.MyTest
13:35:10 [==========] Running 1 test from 1 test case.
13:35:10 [----------] Global test environment set-up.
13:35:10 [----------] 1 test from CategoryName
13:35:10 [ RUN ] CategoryName.MyTest
13:35:10 [ OK ] CategoryName.MyTest (0 ms)
13:35:10 [----------] 1 test from CategoryName (0 ms total)
13:35:10
13:35:10 [----------] Global test environment tear-down
13:35:10 [==========] 1 test from 1 test case ran. (0 ms total)
13:35:10 [ PASSED ] 1 test.
我的日志決議器沒有在這里輸出。當我洗掉 Log Parser 構建后操作時,一切似乎都正常。還嘗試從決議器的組態檔中洗掉所有內容,但沒有得到修復。
關于它可能是什么的任何想法?任何幫助,將不勝感激。謝謝你。
uj5u.com熱心網友回復:
您的構建是否在從屬設備上運行?如果是這樣,Jenkins 在完成構建步驟之后但在將構建標記為完成之前將日志檔案和其他工件復制回主服務器。您可能在此處遇到網路或 I/O 瓶頸。如果您無法找出根本原因并且只想讓構建終止而無需干預,您可以使用構建超時插件。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/415818.html
標籤:
