JNI for test coverage #3965
This commit is contained in:
parent
9ba10b19d4
commit
6c8f130ff9
|
@ -1,10 +1,12 @@
|
||||||
|
CONSOLE_COMMON_SRC_CPP = $(PROJECT_DIR)/console/binary/tooth_logger.cpp \
|
||||||
|
$(PROJECT_DIR)/console/binary_log/log_field.cpp \
|
||||||
|
$(PROJECT_DIR)/console/status_loop.cpp \
|
||||||
|
|
||||||
CONSOLE_SRC_CPP = $(PROJECT_DIR)/console/status_loop.cpp \
|
|
||||||
|
CONSOLE_SRC_CPP = $(CONSOLE_COMMON_SRC_CPP) \
|
||||||
$(PROJECT_DIR)/console/console_io.cpp \
|
$(PROJECT_DIR)/console/console_io.cpp \
|
||||||
$(PROJECT_DIR)/console/eficonsole.cpp \
|
$(PROJECT_DIR)/console/eficonsole.cpp \
|
||||||
$(PROJECT_DIR)/console/connector_uart_dma.cpp \
|
$(PROJECT_DIR)/console/connector_uart_dma.cpp \
|
||||||
$(PROJECT_DIR)/console/binary/tooth_logger.cpp \
|
|
||||||
$(PROJECT_DIR)/console/binary_log/log_field.cpp \
|
|
||||||
$(PROJECT_DIR)/console/binary_log/binary_logging.cpp \
|
$(PROJECT_DIR)/console/binary_log/binary_logging.cpp \
|
||||||
$(PROJECT_DIR)/console/binary_log/usb_console.cpp \
|
$(PROJECT_DIR)/console/binary_log/usb_console.cpp \
|
||||||
$(PROJECT_DIR)/console/binary_log/ethernet_console.cpp \
|
$(PROJECT_DIR)/console/binary_log/ethernet_console.cpp \
|
||||||
|
|
|
@ -81,10 +81,6 @@ void setIdleMode(idle_mode_e value) {
|
||||||
showIdleInfo();
|
showIdleInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
percent_t getIdlePosition() {
|
|
||||||
return engine->module<IdleController>().unmock().currentIdlePosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setManualIdleValvePosition(int positionPercent) {
|
void setManualIdleValvePosition(int positionPercent) {
|
||||||
if (positionPercent < 1 || positionPercent > 99)
|
if (positionPercent < 1 || positionPercent > 99)
|
||||||
return;
|
return;
|
||||||
|
@ -96,6 +92,10 @@ void setManualIdleValvePosition(int positionPercent) {
|
||||||
|
|
||||||
#endif /* EFI_UNIT_TEST */
|
#endif /* EFI_UNIT_TEST */
|
||||||
|
|
||||||
|
percent_t getIdlePosition() {
|
||||||
|
return engine->module<IdleController>().unmock().currentIdlePosition;
|
||||||
|
}
|
||||||
|
|
||||||
void startPedalPins() {
|
void startPedalPins() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
// this is neutral/no gear switch input. on Miata it's wired both to clutch pedal and neutral in gearbox
|
// this is neutral/no gear switch input. on Miata it's wired both to clutch pedal and neutral in gearbox
|
||||||
|
|
|
@ -27,8 +27,7 @@ CPPSRC += $(ALLCPPSRC) \
|
||||||
$(FRAMEWORK_SRC_CPP) \
|
$(FRAMEWORK_SRC_CPP) \
|
||||||
$(TESTS_SRC_CPP) \
|
$(TESTS_SRC_CPP) \
|
||||||
$(DEVELOPMENT_DIR)/engine_sniffer.cpp \
|
$(DEVELOPMENT_DIR)/engine_sniffer.cpp \
|
||||||
$(PROJECT_DIR)/console/binary/tooth_logger.cpp \
|
$(CONSOLE_COMMON_SRC_CPP) \
|
||||||
$(PROJECT_DIR)/console/binary_log/log_field.cpp \
|
|
||||||
$(PROJECT_DIR)/config/boards/hellen/hellen_board_id.cpp \
|
$(PROJECT_DIR)/config/boards/hellen/hellen_board_id.cpp \
|
||||||
$(PROJECT_DIR)/../unit_tests/logicdata.cpp \
|
$(PROJECT_DIR)/../unit_tests/logicdata.cpp \
|
||||||
$(PROJECT_DIR)/../unit_tests/native/native_impl.cpp \
|
$(PROJECT_DIR)/../unit_tests/native/native_impl.cpp \
|
||||||
|
|
|
@ -19,6 +19,7 @@ typedef uint32_t ioportid_t;
|
||||||
typedef uint32_t ioportmask_t;
|
typedef uint32_t ioportmask_t;
|
||||||
|
|
||||||
#define DL_OUTPUT_BUFFER 200
|
#define DL_OUTPUT_BUFFER 200
|
||||||
|
#define FIRMWARE_ID "UNIT_TEST"
|
||||||
|
|
||||||
// just a stub implementation for unit tests
|
// just a stub implementation for unit tests
|
||||||
#define EXPECTED_REMAINING_STACK 1
|
#define EXPECTED_REMAINING_STACK 1
|
||||||
|
|
Loading…
Reference in New Issue