only:reducing unit test logging

This commit is contained in:
rusefillc 2024-02-21 17:31:02 -05:00
parent 19fb7abf44
commit 2b80929ac6
4 changed files with 11 additions and 9 deletions

View File

@ -197,7 +197,7 @@ void InjectionEvent::onTriggerTooth(efitick_t nowNt, float currentPhase, float n
getExecutorInterface()->scheduleByTimestampNt("inj stage 2", nullptr, turnOffTimeStage2, endActionStage2);
}
#if EFI_UNIT_TEST
#if EFI_DEFAILED_LOGGING
printf("scheduling injection angle=%.2f/delay=%d injectionDuration=%d %d\r\n", angleFromNow, (int)NT2US(startTime - nowNt), (int)durationUsStage1, (int)durationUsStage2);
#endif
#if EFI_DEFAILED_LOGGING

View File

@ -250,7 +250,7 @@ bool EventQueue::executeOne(efitick_t now) {
tryReturnScheduling(current);
current = nullptr;
#if EFI_UNIT_TEST
#if EFI_DEFAILED_LOGGING
printf("QUEUE: execute current=%d param=%d\r\n", (uintptr_t)current, (uintptr_t)action.getArgument());
#endif

View File

@ -305,11 +305,11 @@ bool TriggerDecoderBase::validateEventCounters(const TriggerWaveform& triggerSha
isDecodingError |= (currentCycle.eventCount[i] != triggerShape.getExpectedEventCount((TriggerWheel)i));
}
#if EFI_UNIT_TEST
#if EFI_DEFAILED_LOGGING
printf("validateEventCounters: isDecodingError=%d\n", isDecodingError);
if (isDecodingError) {
for (int i = 0;i < PWM_PHASE_MAX_WAVE_PER_PWM;i++) {
printf("count: cur=%d exp=%d\n", currentCycle.eventCount[i], triggerShape.getExpectedEventCount((TriggerWheel)i));
printf(" count: cur=%d exp=%d\n", currentCycle.eventCount[i], triggerShape.getExpectedEventCount((TriggerWheel)i));
}
}
#endif /* EFI_UNIT_TEST */

View File

@ -23,5 +23,7 @@ GTEST_API_ int main(int argc, char **argv) {
//::testing::GTEST_FLAG(filter) = "*AllTriggersFixture*";
int result = RUN_ALL_TESTS();
// windows ERRORLEVEL in Jenkins batch file seems to want negative value to detect failure
return result == 0 ? 0 : -1;
int returnCode = result == 0 ? 0 : -1;
printf("DONE returning %d\n", returnCode);
return returnCode;
}