Line | Branch | Decision | Exec | Source |
---|---|---|---|---|
1 | /** | |||
2 | * @file main.cpp | |||
3 | * @file Unit tests (and some integration tests to be fair) of rusEFI | |||
4 | * | |||
5 | * @author Andrey Belomutskiy, (c) 2012-2021 | |||
6 | */ | |||
7 | ||||
8 | ||||
9 | #include "pch.h" | |||
10 | #include <stdlib.h> | |||
11 | ||||
12 | bool hasInitGtest = false; | |||
13 | ||||
14 | 1 | GTEST_API_ int main(int argc, char **argv) { | ||
15 |
1/4✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1/2✗ Decision 'true' not taken.
✓ Decision 'false' taken 1 time.
|
1 | if (argc == 2 && strcmp(argv[1], "sandbox") == 0) { |
16 | void runSandbox(); | |||
17 | ✗ | runSandbox(); | ||
18 | ✗ | return 0; | ||
19 | } | |||
20 | ||||
21 | 1 | hasInitGtest = true; | ||
22 | ||||
23 | 1 | testing::InitGoogleTest(&argc, argv); | ||
24 | // uncomment if you only want to run selected tests | |||
25 | /** | |||
26 | * See TEST_FROM_TRIGGER_ID to limit test just for last trigger | |||
27 | */ | |||
28 | // todo: can we check argc or argv and setVerboseTrigger(true) dynamically if invoked with AllTriggersFixture? | |||
29 | // command line AllTriggersFixture #7946 | |||
30 | // setVerboseTrigger(true); | |||
31 | // --gtest_filter=*TEST_NAME* | |||
32 | //::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*"; | |||
33 | 1 | int result = RUN_ALL_TESTS(); | ||
34 | // windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure | |||
35 |
1/2✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
|
1 | int returnCode = result == 0 ? 0 : -1; | |
36 | 1 | printf("DONE returning %d\n", returnCode); | ||
37 | 1 | return returnCode; | ||
38 | } | |||
39 |