mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-07-02 05:35:11 +00:00
update parser (#5)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "../../../sdv_services/ipc_com/com_ctrl.cpp"
|
||||
#include "../../../sdv_services/ipc_com/com_channel.cpp"
|
||||
#include "../../../sdv_services/ipc_com/marshall_object.cpp"
|
||||
#include <cstring>
|
||||
|
||||
/**
|
||||
* @brief Main function
|
||||
@@ -13,8 +14,29 @@ extern "C" int wmain(int argc, wchar_t* argv[])
|
||||
extern "C" int main(int argc, char* argv[])
|
||||
#endif
|
||||
{
|
||||
CProcessWatchdog watchdog;
|
||||
// Check for the --gtest_repeat option.
|
||||
bool bRepeatEnabled = false;
|
||||
for (int iIndex = 0; iIndex < argc; iIndex++)
|
||||
{
|
||||
if (!argv[iIndex]) continue;
|
||||
#if defined(_WIN32) && defined(_UNICODE)
|
||||
bRepeatEnabled |= std::wcsncmp(argv[iIndex], L"--gtest_repeat", 14) == 0;
|
||||
#else
|
||||
bRepeatEnabled |= std::strncmp(argv[iIndex], "--gtest_repeat", 14) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
// When repeat is enabled, do not enable the watchdog.
|
||||
if (bRepeatEnabled)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
else
|
||||
{
|
||||
CProcessWatchdog watchdog;
|
||||
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user