From 680c48f86fd697c7aa6fa983cd863e7eca857893 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 12 Nov 2019 15:08:57 +0100 Subject: [PATCH] esp_wifi: remove MD5 related unit tests --- components/esp_wifi/test/CMakeLists.txt | 28 --------- components/esp_wifi/test/component.mk | 20 ------- .../esp_wifi/test/test_header_files_md5.c | 59 ------------------- 3 files changed, 107 deletions(-) delete mode 100644 components/esp_wifi/test/test_header_files_md5.c diff --git a/components/esp_wifi/test/CMakeLists.txt b/components/esp_wifi/test/CMakeLists.txt index 049a1ec682..a4d99b95b4 100644 --- a/components/esp_wifi/test/CMakeLists.txt +++ b/components/esp_wifi/test/CMakeLists.txt @@ -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}\") diff --git a/components/esp_wifi/test/component.mk b/components/esp_wifi/test/component.mk index 3c4a6bb67a..f5f63e41e3 100644 --- a/components/esp_wifi/test/component.mk +++ b/components/esp_wifi/test/component.mk @@ -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) diff --git a/components/esp_wifi/test/test_header_files_md5.c b/components/esp_wifi/test/test_header_files_md5.c deleted file mode 100644 index eb431051ac..0000000000 --- a/components/esp_wifi/test/test_header_files_md5.c +++ /dev/null @@ -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..."); -}