esp_wifi: remove MD5 related unit tests

This commit is contained in:
Ivan Grokhotkov 2019-11-12 15:08:57 +01:00 committed by Jack
parent 568f0af61a
commit 680c48f86f
3 changed files with 0 additions and 107 deletions

View file

@ -7,31 +7,3 @@ idf_component_register(SRC_DIRS ${srcdirs}
INCLUDE_DIRS . ${CMAKE_CURRENT_BINARY_DIR}
REQUIRES unity test_utils nvs_flash ulp esp_common
)
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
# Calculate MD5 value of header file esp_wifi_os_adapter.h
file(MD5 ${esp_wifi_dir}/include/esp_private/wifi_os_adapter.h WIFI_OS_ADAPTER_MD5)
string(SUBSTRING "${WIFI_OS_ADAPTER_MD5}" 0 7 WIFI_OS_ADAPTER_MD5)
# Calculate MD5 value of header file esp_wifi_crypto_types.h
file(MD5 ${esp_wifi_dir}/include/esp_wifi_crypto_types.h WIFI_CRYPTO_MD5)
string(SUBSTRING "${WIFI_CRYPTO_MD5}" 0 7 WIFI_CRYPTO_MD5)
# Calculate MD5 value of header file esp_coexist_adapter.h
file(MD5 ${esp_wifi_dir}/include/esp_coexist_adapter.h COEX_ADAPTER_MD5)
string(SUBSTRING "${COEX_ADAPTER_MD5}" 0 7 COEX_ADAPTER_MD5)
# Calculate MD5 value of header file esp_wifi_types.h
file(MD5 ${esp_wifi_dir}/include/esp_wifi_types.h WIFI_TYPE_MD5)
string(SUBSTRING "${WIFI_TYPE_MD5}" 0 7 WIFI_TYPE_MD5)
# Calculate MD5 value of header file esp_wifi.h
file(MD5 ${esp_wifi_dir}/include/esp_wifi.h WIFI_ESP_WIFI_MD5)
string(SUBSTRING "${WIFI_ESP_WIFI_MD5}" 0 7 WIFI_ESP_WIFI_MD5)
add_definitions(-DWIFI_OS_ADAPTER_MD5=\"${WIFI_OS_ADAPTER_MD5}\")
add_definitions(-DWIFI_CRYPTO_MD5=\"${WIFI_CRYPTO_MD5}\")
add_definitions(-DCOEX_ADAPTER_MD5=\"${COEX_ADAPTER_MD5}\")
add_definitions(-DWIFI_TYPE_MD5=\"${WIFI_TYPE_MD5}\")
add_definitions(-DWIFI_ESP_WIFI_MD5=\"${WIFI_ESP_WIFI_MD5}\")

View file

@ -6,23 +6,3 @@ COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-a
COMPONENT_SRCDIRS := .
COMPONENT_SRCDIRS += esp32
# Calculate MD5 value of header file esp_wifi_os_adapter.h
WIFI_OS_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_private/wifi_os_adapter.h | cut -c 1-7)\"
CFLAGS+=-DWIFI_OS_ADAPTER_MD5=$(WIFI_OS_ADAPTER_MD5_VAL)
# Calculate MD5 value of header file esp_wifi_crypto_types.h
WIFI_CRYPTO_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_wifi_crypto_types.h | cut -c 1-7)\"
CFLAGS+=-DWIFI_CRYPTO_MD5=$(WIFI_CRYPTO_MD5_VAL)
# Calculate MD5 value of header file esp_coexist_adapter.h
COEX_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_coexist_adapter.h | cut -c 1-7)\"
CFLAGS+=-DCOEX_ADAPTER_MD5=$(COEX_ADAPTER_MD5_VAL)
# Calculate MD5 value of header file esp_wifi_types.h
WIFI_TYPE_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_wifi_types.h | cut -c 1-7)\"
CFLAGS+=-DWIFI_TYPE_MD5=$(WIFI_TYPE_MD5_VAL)
# Calculate MD5 value of header file esp_wifi.h
WIFI_ESP_WIFI_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_wifi.h | cut -c 1-7)\"
CFLAGS+=-DWIFI_ESP_WIFI_MD5=$(WIFI_ESP_WIFI_MD5_VAL)

View file

@ -1,59 +0,0 @@
/*
Tests for the Wi-Fi
*/
#include "unity.h"
#include "esp_log.h"
#include "esp_private/wifi.h"
#include "esp_coexist_internal.h"
static const char* TAG = "test_header_files_md5";
TEST_CASE("wifi os adapter MD5","[wifi]")
{
const char *test_wifi_os_funcs_md5 = WIFI_OS_ADAPTER_MD5;
ESP_LOGI(TAG, "test esp_wifi_os_adapter.h MD5...");
TEST_ESP_OK(esp_wifi_internal_osi_funcs_md5_check(test_wifi_os_funcs_md5));
ESP_LOGI(TAG, "test passed...");
}
TEST_CASE("wifi crypto types MD5","[wifi]")
{
const char *test_wifi_crypto_funcs_md5 = WIFI_CRYPTO_MD5;
ESP_LOGI(TAG, "test esp_wifi_crypto_types.h MD5...");
TEST_ESP_OK(esp_wifi_internal_crypto_funcs_md5_check(test_wifi_crypto_funcs_md5));
ESP_LOGI(TAG, "test passed...");
}
TEST_CASE("coexist adapter MD5","[coex]")
{
const char *test_coex_adapter_funcs_md5 = COEX_ADAPTER_MD5;
ESP_LOGI(TAG, "test esp_coexist_adapter.h MD5...");
TEST_ESP_OK(esp_coex_adapter_funcs_md5_check(test_coex_adapter_funcs_md5));
ESP_LOGI(TAG, "test passed...");
}
TEST_CASE("wifi type MD5","[wifi]")
{
const char *test_wifi_type_md5 = WIFI_TYPE_MD5;
ESP_LOGI(TAG, "test esp_wifi_types.h MD5...");
TEST_ESP_OK(esp_wifi_internal_wifi_type_md5_check(test_wifi_type_md5));
ESP_LOGI(TAG, "test passed...");
}
TEST_CASE("esp wifi MD5","[wifi]")
{
const char *test_esp_wifi_md5 = WIFI_ESP_WIFI_MD5;
ESP_LOGI(TAG, "test esp_wifi.h MD5...");
TEST_ESP_OK(esp_wifi_internal_esp_wifi_md5_check(test_esp_wifi_md5));
ESP_LOGI(TAG, "test passed...");
}