forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
30 lines (25 loc) · 793 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* @file main.cpp
* @file Unit tests (and some integration tests to be fair) of rusEFI
*
* @author Andrey Belomutskiy, (c) 2012-2021
*/
#include "pch.h"
#include <stdlib.h>
bool hasInitGtest = false;
GTEST_API_ int main(int argc, char **argv) {
hasInitGtest = true;
testing::InitGoogleTest(&argc, argv);
// uncomment if you only want to run selected tests
/**
* See TEST_FROM_TRIGGER_ID to limit test just for last trigger
*/
// setVerboseTrigger(true);
// --gtest_filter=*TEST_NAME*
//::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*";
int result = RUN_ALL_TESTS();
// windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure
int returnCode = result == 0 ? 0 : -1;
printf("DONE returning %d\n", returnCode);
return returnCode;
}