diff --git a/java_console/io/src/test/java/com/rusefi/native_/JniUnitTest.java b/java_console/io/src/test/java/com/rusefi/native_/JniUnitTest.java index 9326ed4d74..e15d5bc27d 100644 --- a/java_console/io/src/test/java/com/rusefi/native_/JniUnitTest.java +++ b/java_console/io/src/test/java/com/rusefi/native_/JniUnitTest.java @@ -12,5 +12,7 @@ public class JniUnitTest { EngineLogic engineLogic = new EngineLogic(); String version = engineLogic.getVersion(); assertTrue("Got " + version, version.contains("Hello")); + + engineLogic.invokePeriodicCallback(); } } diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index bf25f5d1e8..93160dafc3 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -135,9 +135,12 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb EngineTestHelper::~EngineTestHelper() { // Write history to file - std::stringstream filePath; - filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata"; - writeEvents(filePath.str().c_str()); + extern bool hasInitGtest; + if (hasInitGtest) { + std::stringstream filePath; + filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata"; + writeEvents(filePath.str().c_str()); + } // Cleanup enginePins.reset();