reducing hell in unit tests

This commit is contained in:
rusefi 2019-09-25 08:40:33 -04:00
parent 0a70bdf6f8
commit bc572bef51
3 changed files with 5 additions and 3 deletions

View File

@ -142,6 +142,9 @@ public:
// Clamp to >100hz
int freq = maxI(100, engineConfiguration->etbFreq);
// no need to complicate event queue with ETB PWM in unit tests
#if ! EFI_UNIT_TEST
startSimplePwm(&m_pwmEnable, "ETB Enable",
&engine->executor,
&m_pinEnable,
@ -162,6 +165,7 @@ public:
freq,
0,
(pwm_gen_callback*)applyPinState);
#endif EFI_UNIT_TEST
}
};

View File

@ -127,7 +127,7 @@ void EngineTestHelper::fireTriggerEvents2(int count, int durationMs) {
void EngineTestHelper::clearQueue() {
engine.executor.executeAll(99999999); // this is needed to clear 'isScheduled' flag
ASSERT_EQ( 0, engine.executor.size()) << "queue size/0";
ASSERT_EQ( 0, engine.executor.size()) << "Failed to clearQueue";
engine.iHead = NULL; // let's drop whatever was scheduled just to start from a clean state
}

View File

@ -107,8 +107,6 @@ TEST(idle, timingPid) {
print("******************************************* testTimingPidController\r\n");
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
// basic engine setup
setupSimpleTestEngineWithMafAndTT_ONE_trigger(&eth);
// set PID settings
pid_s pidS;