2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file main.cpp
|
2020-12-04 13:10:58 -08:00
|
|
|
* @file Unit tests (and some integration tests to be fair) of rusEFI
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
2021-05-07 14:43:24 -07:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2021
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2017-01-02 12:03:26 -08:00
|
|
|
|
2021-08-31 02:37:14 -07:00
|
|
|
#include "pch.h"
|
2018-09-16 20:10:06 -07:00
|
|
|
#include <stdlib.h>
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-03-14 12:00:02 -07:00
|
|
|
bool hasInitGtest = false;
|
|
|
|
|
2019-01-03 17:14:23 -08:00
|
|
|
GTEST_API_ int main(int argc, char **argv) {
|
2022-03-14 12:00:02 -07:00
|
|
|
hasInitGtest = true;
|
|
|
|
|
2019-01-03 17:14:23 -08:00
|
|
|
testing::InitGoogleTest(&argc, argv);
|
2019-01-08 18:40:21 -08:00
|
|
|
// uncomment if you only want to run selected tests
|
2021-02-06 17:53:30 -08:00
|
|
|
/**
|
|
|
|
* See TEST_FROM_TRIGGER_ID to limit test just for last trigger
|
|
|
|
*/
|
2021-08-31 01:27:31 -07:00
|
|
|
// setVerboseTrigger(true);
|
2024-04-26 19:18:01 -07:00
|
|
|
// --gtest_filter=*TEST_NAME*
|
2023-02-21 14:28:14 -08:00
|
|
|
//::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*";
|
2019-02-01 19:40:24 -08:00
|
|
|
int result = RUN_ALL_TESTS();
|
2019-02-01 19:55:35 -08:00
|
|
|
// windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure
|
2024-02-21 14:31:02 -08:00
|
|
|
int returnCode = result == 0 ? 0 : -1;
|
|
|
|
printf("DONE returning %d\n", returnCode);
|
|
|
|
return returnCode;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|