rusefi-1/unit_tests/main.cpp

48 lines
1.0 KiB
C++
Raw Normal View History

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
*
2020-04-18 19:46:22 -07:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2017-01-02 12:03:26 -08:00
2018-09-16 20:10:06 -07:00
#include <stdlib.h>
2015-07-10 06:01:56 -07:00
2018-09-16 19:39:46 -07:00
#include "global.h"
2015-07-10 06:01:56 -07:00
#include "engine_configuration.h"
#include "test_signal_executor.h"
#include "trigger_central.h"
#include "map_resize.h"
#include "engine_math.h"
#include "engine_test_helper.h"
2019-01-03 17:14:23 -08:00
#include "gtest/gtest.h"
2015-07-10 06:01:56 -07:00
2018-03-04 13:30:03 -08:00
int timeNowUs = 0;
2015-07-10 06:01:56 -07:00
efitimeus_t getTimeNowUs(void) {
2018-03-04 13:30:03 -08:00
return timeNowUs;
2015-07-10 06:01:56 -07:00
}
efitick_t getTimeNowNt(void) {
return getTimeNowUs() * US_TO_NT_MULTIPLIER;
}
2019-08-24 22:15:18 -07:00
bool verboseMode = false;
2015-07-10 06:01:56 -07:00
2019-01-03 17:14:23 -08:00
GTEST_API_ int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
2019-01-08 18:40:21 -08:00
// uncomment if you only want to run selected tests
/**
* See TEST_FROM_TRIGGER_ID to limit test just for last trigger
*/
//::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
2019-02-01 19:40:24 -08:00
return result == 0 ? 0 : -1;
2015-07-10 06:01:56 -07:00
}
void initLogging(LoggingWithStorage *logging, const char *name) {
}