set(_tests "../../../ports/esp_idf/tests")
idf_component_register(SRCS "main.cpp" "hil_server.cpp" "${_tests}/test_main.cpp" "${_tests}/test_its_time.cpp" "${_tests}/hil_sut.cpp"
    REQUIRES vanetza-idf esp_driver_usb_serial_jtag nvs_flash)
if(CONFIG_VANETZA_IDF_NETWORK)
    target_sources(${COMPONENT_LIB} PRIVATE "${_tests}/test_management.cpp")
endif()
if(CONFIG_VANETZA_IDF_SECURITY)
    target_sources(${COMPONENT_LIB} PRIVATE "${_tests}/test_backend_kat.cpp" "${_tests}/test_security_entity.cpp"
        "${_tests}/test_trust_domain.cpp" "${_tests}/test_credentials.cpp")
endif()
if(CONFIG_VANETZA_IDF_PKI)
    target_sources(${COMPONENT_LIB} PRIVATE "${_tests}/test_pki.cpp")
endif()
target_compile_definitions(${COMPONENT_LIB} PRIVATE main=vidf_test_main)
target_compile_features(${COMPONENT_LIB} PRIVATE cxx_std_17)
