Merge branch 'feature/ci_optimize_artifact_download_v4.0' into 'release/v4.0'

CI: optimize example build and artifact download (backport v4.0)

See merge request espressif/esp-idf!6940
This commit is contained in:
Angus Gratton
2019-12-13 11:36:04 +08:00
160 changed files with 3460 additions and 1602 deletions

View File

@@ -22,11 +22,18 @@ variables:
# GIT_STRATEGY is not defined here. # GIT_STRATEGY is not defined here.
# Use an option from "CI / CD Settings" - "General pipelines". # Use an option from "CI / CD Settings" - "General pipelines".
# "normal" strategy for fetching only top-level submodules since nothing requires the sub-submodules code for building IDF. # we will download archive for each submodule instead of clone.
# If the "recursive" strategy is used we have a problem with using relative URLs for sub-submodules. # we don't do "recursive" when fetch submodule as they're not used in CI now.
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: none
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
# by default we will fetch all submodules
# jobs can overwrite this variable to only fetch submodules they required
# set to "none" if don't need to fetch submodules
SUBMODULES_TO_FETCH: "all"
# tell build system do not check submodule update as we download archive instead of clone
IDF_SKIP_CHECK_SUBMODULES: 1
UNIT_TEST_BUILD_SYSTEM: make UNIT_TEST_BUILD_SYSTEM: cmake
# IDF environment # IDF environment
IDF_PATH: "$CI_PROJECT_DIR" IDF_PATH: "$CI_PROJECT_DIR"
@@ -42,6 +49,7 @@ variables:
CI_TARGET_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/tools/ci/config/target-test.yml" CI_TARGET_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/tools/ci/config/target-test.yml"
# before each job, we need to check if this job is filtered by bot stage/job filter # before each job, we need to check if this job is filtered by bot stage/job filter
.apply_bot_filter: &apply_bot_filter .apply_bot_filter: &apply_bot_filter
python $APPLY_BOT_FILTER_SCRIPT || exit 0 python $APPLY_BOT_FILTER_SCRIPT || exit 0
@@ -70,12 +78,10 @@ variables:
tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1 tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1
fi fi
.show_submodule_urls: &show_submodule_urls | .fetch_submodules: &fetch_submodules |
git config --get-regexp '^submodule\..*\.url$' || true python $SUBMODULE_FETCH_TOOL -s $SUBMODULES_TO_FETCH
before_script: before_script:
- echo "Running common script"
- *show_submodule_urls
- source tools/ci/setup_python.sh - source tools/ci/setup_python.sh
# apply bot filter in before script # apply bot filter in before script
- *apply_bot_filter - *apply_bot_filter
@@ -91,6 +97,8 @@ before_script:
- *setup_tools_unless_target_test - *setup_tools_unless_target_test
- *fetch_submodules
- *setup_custom_toolchain - *setup_custom_toolchain
# used for check scripts which we want to run unconditionally # used for check scripts which we want to run unconditionally

View File

@@ -145,3 +145,11 @@ if(GCC_NOT_5_2_0)
-Wno-implicit-fallthrough -Wno-implicit-fallthrough
) )
endif() endif()
# "comparison is always false due to limited range of data type" warning
# when setting CONFIG_LWIP_TCP_WND_DEFAULT to 65535
set_source_files_properties(
lwip/src/core/tcp.c
PROPERTIES COMPILE_FLAGS
-Wno-type-limits
)

View File

@@ -36,4 +36,6 @@ lwip/src/netif/ppp/ppp.o: CFLAGS += -Wno-uninitialized
lwip/src/netif/ppp/pppos.o: CFLAGS += -Wno-implicit-fallthrough lwip/src/netif/ppp/pppos.o: CFLAGS += -Wno-implicit-fallthrough
endif endif
lwip/src/core/tcp.o: CFLAGS += -Wno-type-limits
COMPONENT_ADD_LDFRAGMENTS += linker.lf COMPONENT_ADD_LDFRAGMENTS += linker.lf

View File

@@ -2,7 +2,7 @@ idf_build_get_property(soc_name IDF_TARGET)
get_filename_component(soc_test "${CMAKE_CURRENT_SOURCE_DIR}/../${soc_name}/test" ABSOLUTE) get_filename_component(soc_test "${CMAKE_CURRENT_SOURCE_DIR}/../${soc_name}/test" ABSOLUTE)
if(EXISTS "${soc_test}") if(EXISTS "${soc_test}")
set(srcs "${soc_test}") set(src_dirs "${soc_test}")
set(include_dirs "${soc_test}") set(include_dirs "${soc_test}")
endif() endif()

View File

@@ -1,7 +1,4 @@
idf_component_register(SRC_DIRS "." idf_component_register(SRC_DIRS "."
INCLUDE_DIRS "." INCLUDE_DIRS "."
EXCLUDE_SRCS "test_esp_flash.c" "test_partition_ext.c"
REQUIRES unity test_utils spi_flash bootloader_support app_update) REQUIRES unity test_utils spi_flash bootloader_support app_update)
if(CONFIG_SPI_FLASH_USE_LEGACY_IMPL)
set(COMPONENT_SRCEXCLUDE "test_esp_flash.c" "test_partition_ext.c")
endif()

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -6,8 +6,8 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
# #
# ESP32-specific config # ESP32-specific config
# #

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 CONFIG_BTDM_CTRL_BLE_MAX_CONN=9
CONFIG_GATTS_NOTIFY_THROUGHPUT=y CONFIG_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 CONFIG_BTDM_CTRL_BLE_MAX_CONN=9
CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT=y CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n

View File

@@ -6,8 +6,8 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y
CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=n CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=n
CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 CONFIG_BTDM_CTRL_PINNED_TO_CORE=0

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -6,8 +6,8 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
# #
# ESP32-specific config # ESP32-specific config

View File

@@ -2,6 +2,6 @@
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 CONFIG_BTDM_CTRL_BLE_MAX_CONN=9

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
# Classic BT is enabled and BT_DRAM_RELEASE is disabled # Classic BT is enabled and BT_DRAM_RELEASE is disabled
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED=y CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_BT_A2DP_ENABLE=y CONFIG_BT_A2DP_ENABLE=y

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
# Classic BT is enabled # Classic BT is enabled
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED=y CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_BT_A2DP_ENABLE=y CONFIG_BT_A2DP_ENABLE=y

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
# Classic BT is enabled and BT_DRAM_RELEASE is disabled # Classic BT is enabled and BT_DRAM_RELEASE is disabled
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_BT_A2DP_ENABLE=n CONFIG_BT_A2DP_ENABLE=n
CONFIG_BT_BLE_ENABLED=n CONFIG_BT_BLE_ENABLED=n

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled # Override some defaults so BT stack is enabled
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_WIFI_ENABLED=n CONFIG_WIFI_ENABLED=n
CONFIG_BT_SPP_ENABLED=y CONFIG_BT_SPP_ENABLED=y

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled # Override some defaults so BT stack is enabled
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_WIFI_ENABLED=n CONFIG_WIFI_ENABLED=n
CONFIG_BT_SPP_ENABLED=y CONFIG_BT_SPP_ENABLED=y

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled # Override some defaults so BT stack is enabled
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_WIFI_ENABLED=n CONFIG_WIFI_ENABLED=n
CONFIG_BT_SPP_ENABLED=y CONFIG_BT_SPP_ENABLED=y

View File

@@ -1,9 +1,9 @@
# Override some defaults so BT stack is enabled # Override some defaults so BT stack is enabled
# and WiFi disabled by default in this example # and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_CLASSIC_ENABLED=y CONFIG_BT_CLASSIC_ENABLED=y
CONFIG_WIFI_ENABLED=n CONFIG_WIFI_ENABLED=n
CONFIG_BT_SPP_ENABLED=y CONFIG_BT_SPP_ENABLED=y

View File

@@ -1,8 +1,8 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
# Classic BT is enabled and BT_DRAM_RELEASE is disabled # Classic BT is enabled and BT_DRAM_RELEASE is disabled
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM=y CONFIG_BTDM_CTRL_MODE_BTDM=y
CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y
CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=n CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=n

View File

@@ -2,5 +2,5 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n

View File

@@ -5,8 +5,8 @@ CONFIG_ESPTOOLPY_BAUD_921600B=y
CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B=y CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B=y
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -42,7 +42,7 @@ CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1
CONFIG_BLE_MESH_RX_SDU_MAX=384 CONFIG_BLE_MESH_RX_SDU_MAX=384
CONFIG_BLE_MESH_TX_SEG_MAX=32 CONFIG_BLE_MESH_TX_SEG_MAX=32
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -29,8 +29,8 @@ CONFIG_BLE_MESH_NET_BUF_POOL_USAGE=y
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=y CONFIG_BLE_MESH_GATT_PROXY_SERVER=y
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BLE_MESH_MSG_CACHE_SIZE=10 CONFIG_BLE_MESH_MSG_CACHE_SIZE=10
CONFIG_BLE_MESH_ADV_BUF_COUNT=60 CONFIG_BLE_MESH_ADV_BUF_COUNT=60
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=6 CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=6

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -30,8 +30,8 @@ CONFIG_BLE_MESH_NET_BUF_POOL_USAGE=y
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=n CONFIG_BLE_MESH_GATT_PROXY_SERVER=n
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -38,8 +38,8 @@ CONFIG_BLE_MESH_MODEL_GROUP_COUNT=3
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=y CONFIG_BLE_MESH_GATT_PROXY_SERVER=y
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_CRPL=60 CONFIG_BLE_MESH_CRPL=60

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -26,7 +26,7 @@ CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=y CONFIG_BLE_MESH_GATT_PROXY_SERVER=y
CONFIG_BLE_MESH_NODE_ID_TIMEOUT=60 CONFIG_BLE_MESH_NODE_ID_TIMEOUT=60
CONFIG_BLE_MESH_PROXY_FILTER_SIZE=1 CONFIG_BLE_MESH_PROXY_FILTER_SIZE=1
CONFIG_BLE_MESH_IV_UPDATE_TEST= CONFIG_BLE_MESH_IV_UPDATE_TEST=n
CONFIG_BLE_MESH_SUBNET_COUNT=1 CONFIG_BLE_MESH_SUBNET_COUNT=1
CONFIG_BLE_MESH_APP_KEY_COUNT=1 CONFIG_BLE_MESH_APP_KEY_COUNT=1
CONFIG_BLE_MESH_MODEL_KEY_COUNT=1 CONFIG_BLE_MESH_MODEL_KEY_COUNT=1
@@ -40,8 +40,8 @@ CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1
CONFIG_BLE_MESH_RX_SDU_MAX=384 CONFIG_BLE_MESH_RX_SDU_MAX=384
CONFIG_BLE_MESH_TX_SEG_MAX=32 CONFIG_BLE_MESH_TX_SEG_MAX=32
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BLE_MESH_CFG_CLI= CONFIG_BLE_MESH_CFG_CLI=n
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -39,7 +39,7 @@ CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1
CONFIG_BLE_MESH_RX_SDU_MAX=384 CONFIG_BLE_MESH_RX_SDU_MAX=384
CONFIG_BLE_MESH_TX_SEG_MAX=32 CONFIG_BLE_MESH_TX_SEG_MAX=32
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512

View File

@@ -2,8 +2,8 @@
# by default in this example # by default in this example
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -30,8 +30,8 @@ CONFIG_BLE_MESH_NET_BUF_POOL_USAGE=y
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=n CONFIG_BLE_MESH_GATT_PROXY_SERVER=n
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BLE_MESH_ADV_BUF_COUNT=60 CONFIG_BLE_MESH_ADV_BUF_COUNT=60
CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=6 CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=6
CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=6 CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=6

View File

@@ -18,8 +18,8 @@ CONFIG_BLE_MESH_NET_BUF_POOL_USAGE=y
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=y CONFIG_BLE_MESH_GATT_PROXY_SERVER=y
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_CRPL=60 CONFIG_BLE_MESH_CRPL=60

View File

@@ -6,8 +6,8 @@ CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BTDM_MODEM_SLEEP=n CONFIG_BTDM_MODEM_SLEEP=n
CONFIG_BTDM_BLE_SCAN_DUPL=y CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE=2 CONFIG_BTDM_SCAN_DUPL_TYPE=2
@@ -38,8 +38,8 @@ CONFIG_BLE_MESH_NET_BUF_POOL_USAGE=y
CONFIG_BLE_MESH_PB_GATT=y CONFIG_BLE_MESH_PB_GATT=y
CONFIG_BLE_MESH_GATT_PROXY_SERVER=y CONFIG_BLE_MESH_GATT_PROXY_SERVER=y
CONFIG_BLE_MESH_RELAY=y CONFIG_BLE_MESH_RELAY=y
CONFIG_BLE_MESH_LOW_POWER= CONFIG_BLE_MESH_LOW_POWER=n
CONFIG_BLE_MESH_FRIEND= CONFIG_BLE_MESH_FRIEND=n
CONFIG_BT_BTU_TASK_STACK_SIZE=4512 CONFIG_BT_BTU_TASK_STACK_SIZE=4512
CONFIG_BLE_MESH_CFG_CLI=y CONFIG_BLE_MESH_CFG_CLI=y
CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y CONFIG_BLE_MESH_GENERIC_ONOFF_CLI=y
@@ -63,18 +63,18 @@ CONFIG_ESP32_WIFI_TX_BA_WIN=32
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=32 CONFIG_ESP32_WIFI_RX_BA_WIN=32
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534 CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y CONFIG_ESPTOOLPY_FLASHFREQ_40M=y

View File

@@ -5,8 +5,8 @@
# BT config # BT config
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY= CONFIG_BTDM_CTRL_MODE_BLE_ONLY=n
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM=y CONFIG_BTDM_CTRL_MODE_BTDM=y
CONFIG_BTDM_CTRL_BLE_MAX_CONN=9 CONFIG_BTDM_CTRL_BLE_MAX_CONN=9
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN=7 CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN=7

View File

@@ -8,5 +8,3 @@ CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM=n CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_CONTROLLER_ONLY=y

View File

@@ -16,42 +16,20 @@
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import re import re
import uuid import uuid
import subprocess import subprocess
try: from tiny_test_fw import Utility
# This environment variable is expected on the host machine import ttfw_idf
test_fw_path = os.getenv("TEST_FW_PATH") from ble import lib_ble_client
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
except ImportError as e:
print(e)
print("\nCheck your IDF_PATH\nOR")
print("Try `export TEST_FW_PATH=$IDF_PATH/tools/tiny-test-fw` for resolving the issue\nOR")
print("Try `pip install -r $IDF_PATH/tools/tiny-test-fw/requirements.txt` for resolving the issue")
import IDF
try:
import lib_ble_client
except ImportError:
lib_ble_client_path = os.getenv("IDF_PATH") + "/tools/ble"
if lib_ble_client_path and lib_ble_client_path not in sys.path:
sys.path.insert(0, lib_ble_client_path)
import lib_ble_client
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
# > make print_flash_cmd | tail -n 1 > build/download.config # > make print_flash_cmd | tail -n 1 > build/download.config
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_example_app_ble_central(env, extra_data): def test_example_app_ble_central(env, extra_data):
""" """
Steps: Steps:
@@ -72,7 +50,7 @@ def test_example_app_ble_central(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut.app.binary_path, "blecent.bin") binary_file = os.path.join(dut.app.binary_path, "blecent.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("blecent_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("blecent_bin_size", "{}KB".format(bin_size // 1024))
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting blecent example test app") Utility.console_log("Starting blecent example test app")

View File

@@ -6,7 +6,7 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED= CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -16,41 +16,19 @@
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import re import re
import threading import threading
import traceback import traceback
import Queue import Queue
import subprocess import subprocess
try: from tiny_test_fw import Utility
# This environment variable is expected on the host machine import ttfw_idf
test_fw_path = os.getenv("TEST_FW_PATH") from ble import lib_ble_client
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
except ImportError as e:
print(e)
print("\nCheck your IDF_PATH\nOR")
print("Try `export TEST_FW_PATH=$IDF_PATH/tools/tiny-test-fw` for resolving the issue\nOR")
print("Try `pip install -r $IDF_PATH/tools/tiny-test-fw/requirements.txt` for resolving the issue\n")
import IDF
try:
import lib_ble_client
except ImportError:
lib_ble_client_path = os.getenv("IDF_PATH") + "/tools/ble"
if lib_ble_client_path and lib_ble_client_path not in sys.path:
sys.path.insert(0, lib_ble_client_path)
import lib_ble_client
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
# > make print_flash_cmd | tail -n 1 > build/download.config # > make print_flash_cmd | tail -n 1 > build/download.config
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
def blehr_client_task(hr_obj, dut_addr): def blehr_client_task(hr_obj, dut_addr):
@@ -114,7 +92,7 @@ class BleHRThread(threading.Thread):
self.exceptions_queue.put(traceback.format_exc(), block=False) self.exceptions_queue.put(traceback.format_exc(), block=False)
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_example_app_ble_hr(env, extra_data): def test_example_app_ble_hr(env, extra_data):
""" """
Steps: Steps:
@@ -133,8 +111,8 @@ def test_example_app_ble_hr(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut.app.binary_path, "blehr.bin") binary_file = os.path.join(dut.app.binary_path, "blehr.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("blehr_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("blehr_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("blehr_bin_size", bin_size // 1024) ttfw_idf.check_performance("blehr_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting blehr simple example test app") Utility.console_log("Starting blehr simple example test app")

View File

@@ -6,7 +6,7 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED= CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -6,8 +6,8 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED= CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_MESH=y CONFIG_BT_NIMBLE_MESH=y

View File

@@ -16,35 +16,15 @@
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import re import re
import Queue import Queue
import traceback import traceback
import threading import threading
import subprocess import subprocess
try: from tiny_test_fw import Utility
# This environment variable is expected on the host machine import ttfw_idf
test_fw_path = os.getenv("TEST_FW_PATH") from ble import lib_ble_client
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
except ImportError as e:
print(e)
print("Try `export TEST_FW_PATH=$IDF_PATH/tools/tiny-test-fw` for resolving the issue")
print("Try `pip install -r $IDF_PATH/tools/tiny-test-fw/requirements.txt` for resolving the issue")
import IDF
try:
import lib_ble_client
except ImportError:
lib_ble_client_path = os.getenv("IDF_PATH") + "/tools/ble"
if lib_ble_client_path and lib_ble_client_path not in sys.path:
sys.path.insert(0, lib_ble_client_path)
import lib_ble_client
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
@@ -135,7 +115,7 @@ class BlePrphThread(threading.Thread):
self.exceptions_queue.put(traceback.format_exc(), block=False) self.exceptions_queue.put(traceback.format_exc(), block=False)
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_example_app_ble_peripheral(env, extra_data): def test_example_app_ble_peripheral(env, extra_data):
""" """
Steps: Steps:
@@ -154,8 +134,8 @@ def test_example_app_ble_peripheral(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut.app.binary_path, "bleprph.bin") binary_file = os.path.join(dut.app.binary_path, "bleprph.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("bleprph_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("bleprph_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("bleprph_bin_size", bin_size // 1024) ttfw_idf.check_performance("bleprph_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting bleprph simple example test app") Utility.console_log("Starting bleprph simple example test app")

View File

@@ -6,7 +6,7 @@
# #
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_BLUEDROID_ENABLED= CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -5,20 +5,10 @@ from __future__ import print_function
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
import os import os
import sys
import hashlib import hashlib
try: from tiny_test_fw import Utility
import IDF import ttfw_idf
except ImportError:
# This environment variable is expected on the host machine
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import Utility
def verify_elf_sha256_embedding(dut): def verify_elf_sha256_embedding(dut):
@@ -38,13 +28,13 @@ def verify_elf_sha256_embedding(dut):
raise ValueError('ELF file SHA256 mismatch') raise ValueError('ELF file SHA256 mismatch')
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_blink(env, extra_data): def test_examples_blink(env, extra_data):
dut = env.get_dut("blink", "examples/get-started/blink") dut = env.get_dut("blink", "examples/get-started/blink")
binary_file = os.path.join(dut.app.binary_path, "blink.bin") binary_file = os.path.join(dut.app.binary_path, "blink.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("blink_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("blink_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("blink_bin_size", bin_size // 1024) ttfw_idf.check_performance("blink_bin_size", bin_size // 1024)
dut.start_app() dut.start_app()

View File

@@ -1,27 +1,15 @@
# Need Python 3 string formatting functions # Need Python 3 string formatting functions
from __future__ import print_function from __future__ import print_function
import os import ttfw_idf
import sys
try:
import IDF
except ImportError:
# The test cause is dependent on the Tiny Test Framework. Ensure the
# `TEST_FW_PATH` environment variable is set to `$IDF_PATH/tools/tiny-test-fw`
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
# CAN Self Test Example constants # CAN Self Test Example constants
STR_EXPECT = ("CAN Alert and Recovery: Driver installed", "CAN Alert and Recovery: Driver uninstalled") STR_EXPECT = ("CAN Alert and Recovery: Driver installed", "CAN Alert and Recovery: Driver uninstalled")
EXPECT_TIMEOUT = 20 EXPECT_TIMEOUT = 20
@IDF.idf_example_test(env_tag='Example_CAN1', ignore=True) @ttfw_idf.idf_example_test(env_tag='Example_CAN1')
def test_can_alert_and_recovery_example(env, extra_data): def test_can_alert_and_recovery_example(env, extra_data):
# Get device under test, flash and start example. "dut4" must be defined in EnvConfig
dut = env.get_dut('dut1', 'examples/peripherals/can/can_alert_and_recovery') dut = env.get_dut('dut1', 'examples/peripherals/can/can_alert_and_recovery')
dut.start_app() dut.start_app()

View File

@@ -1,18 +1,9 @@
# Need Python 3 string formatting functions # Need Python 3 string formatting functions
from __future__ import print_function from __future__ import print_function
import os
import sys
from threading import Thread from threading import Thread
try:
import IDF import ttfw_idf
except ImportError:
# The test cause is dependent on the Tiny Test Framework. Ensure the
# `TEST_FW_PATH` environment variable is set to `$IDF_PATH/tools/tiny-test-fw`
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
# Define tuple of strings to expect for each DUT. # Define tuple of strings to expect for each DUT.
master_expect = ("CAN Master: Driver installed", "CAN Master: Driver uninstalled") master_expect = ("CAN Master: Driver installed", "CAN Master: Driver uninstalled")
@@ -36,7 +27,7 @@ def dut_thread_callback(**kwargs):
result[0] = True result[0] = True
@IDF.idf_example_test(env_tag='Example_CAN2', ignore=True) @ttfw_idf.idf_example_test(env_tag='Example_CAN2')
def test_can_network_example(env, extra_data): def test_can_network_example(env, extra_data):
# Get device under test. "dut1", "dut2", and "dut3" must be properly defined in EnvConfig # Get device under test. "dut1", "dut2", and "dut3" must be properly defined in EnvConfig

View File

@@ -1,17 +1,7 @@
# Need Python 3 string formatting functions # Need Python 3 string formatting functions
from __future__ import print_function from __future__ import print_function
import os import ttfw_idf
import sys
try:
import IDF
except ImportError:
# The test cause is dependent on the Tiny Test Framework. Ensure the
# `TEST_FW_PATH` environment variable is set to `$IDF_PATH/tools/tiny-test-fw`
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
# CAN Self Test Example constants # CAN Self Test Example constants
@@ -19,9 +9,9 @@ STR_EXPECT = ("CAN Self Test: Driver installed", "CAN Self Test: Driver uninstal
EXPECT_TIMEOUT = 20 EXPECT_TIMEOUT = 20
@IDF.idf_example_test(env_tag='Example_CAN1', ignore=True) @ttfw_idf.idf_example_test(env_tag='Example_CAN1')
def test_can_self_test_example(env, extra_data): def test_can_self_test_example(env, extra_data):
# Get device under test, flash and start example. "dut4" must be defined in EnvConfig # Get device under test, flash and start example. "dut1" must be defined in EnvConfig
dut = env.get_dut('dut1', 'examples/peripherals/can/can_self_test') dut = env.get_dut('dut1', 'examples/peripherals/can/can_self_test')
dut.start_app() dut.start_app()

View File

@@ -1,19 +1,11 @@
from __future__ import print_function from __future__ import print_function
import os
import sys import ttfw_idf
EXPECT_TIMEOUT = 20 EXPECT_TIMEOUT = 20
try:
import IDF
except ImportError:
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@ttfw_idf.idf_example_test(env_tag='Example_I2C_CCS811_SENSOR')
@IDF.idf_example_test(env_tag='Example_I2C_CCS811_SENSOR')
def test_i2ctools_example(env, extra_data): def test_i2ctools_example(env, extra_data):
# Get device under test, flash and start example. "i2ctool" must be defined in EnvConfig # Get device under test, flash and start example. "i2ctool" must be defined in EnvConfig
dut = env.get_dut('i2ctools', 'examples/peripherals/i2c/i2c_tools') dut = env.get_dut('i2ctools', 'examples/peripherals/i2c/i2c_tools')

View File

@@ -12,24 +12,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" example of writing test with TinyTestFW """ from tiny_test_fw import TinyFW
import os import ttfw_idf
import sys
try:
import TinyFW
except ImportError:
# if we want to run test case outside `tiny-test-fw` folder,
# we need to insert tiny-test-fw path into sys path
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import TinyFW
import IDF
@IDF.idf_example_test(env_tag="Example_SDIO", ignore=True) @ttfw_idf.idf_example_test(env_tag="Example_SDIO", ignore=True)
def test_example_sdio_communication(env, extra_data): def test_example_sdio_communication(env, extra_data):
""" """
Configurations Configurations
@@ -132,5 +119,5 @@ def test_example_sdio_communication(env, extra_data):
if __name__ == '__main__': if __name__ == '__main__':
TinyFW.set_default_config(env_config_file="EnvConfigTemplate.yml", dut=IDF.IDFDUT) TinyFW.set_default_config(env_config_file="EnvConfigTemplate.yml", dut=ttfw_idf.IDFDUT)
test_example_sdio_communication() test_example_sdio_communication()

View File

@@ -1,21 +1,10 @@
import re import re
import os import os
import sys
import socket import socket
from threading import Thread from threading import Thread
import time import time
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
global g_client_response global g_client_response
global g_msg_to_client global g_msg_to_client
@@ -55,7 +44,7 @@ def chat_server_sketch(my_ip):
print("server closed") print("server closed")
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_asio_chat_client(env, extra_data): def test_examples_protocol_asio_chat_client(env, extra_data):
""" """
steps: | steps: |
@@ -73,8 +62,8 @@ def test_examples_protocol_asio_chat_client(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "asio_chat_client.bin") binary_file = os.path.join(dut1.app.binary_path, "asio_chat_client.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("asio_chat_client_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("asio_chat_client_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("asio_chat_client_size", bin_size // 1024) ttfw_idf.check_performance("asio_chat_client_size", bin_size // 1024)
# 1. start a tcp server on the host # 1. start a tcp server on the host
host_ip = get_my_ip() host_ip = get_my_ip()
thread1 = Thread(target=chat_server_sketch, args=(host_ip,)) thread1 = Thread(target=chat_server_sketch, args=(host_ip,))

View File

@@ -1,23 +1,11 @@
import re import re
import os import os
import sys
import socket import socket
import ttfw_idf
try:
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_asio_chat_server(env, extra_data): def test_examples_protocol_asio_chat_server(env, extra_data):
""" """
steps: | steps: |
@@ -31,8 +19,8 @@ def test_examples_protocol_asio_chat_server(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "asio_chat_server.bin") binary_file = os.path.join(dut1.app.binary_path, "asio_chat_server.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("asio_chat_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("asio_chat_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("asio_chat_server_size", bin_size // 1024) ttfw_idf.check_performance("asio_chat_server_size", bin_size // 1024)
# 1. start test # 1. start test
dut1.start_app() dut1.start_app()
# 2. get the server IP address # 2. get the server IP address

View File

@@ -1,24 +1,11 @@
import re import re
import os import os
import sys
import socket import socket
import ttfw_idf
try:
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_asio_tcp_server(env, extra_data): def test_examples_protocol_asio_tcp_server(env, extra_data):
""" """
steps: | steps: |
@@ -33,8 +20,8 @@ def test_examples_protocol_asio_tcp_server(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "asio_tcp_echo_server.bin") binary_file = os.path.join(dut1.app.binary_path, "asio_tcp_echo_server.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("asio_tcp_echo_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("asio_tcp_echo_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("asio_tcp_echo_server_size", bin_size // 1024) ttfw_idf.check_performance("asio_tcp_echo_server_size", bin_size // 1024)
# 1. start test # 1. start test
dut1.start_app() dut1.start_app()
# 2. get the server IP address # 2. get the server IP address

View File

@@ -1,24 +1,11 @@
import re import re
import os import os
import sys
import socket import socket
import ttfw_idf
try:
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_asio_udp_server(env, extra_data): def test_examples_protocol_asio_udp_server(env, extra_data):
""" """
steps: | steps: |
@@ -33,8 +20,8 @@ def test_examples_protocol_asio_udp_server(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "asio_udp_echo_server.bin") binary_file = os.path.join(dut1.app.binary_path, "asio_udp_echo_server.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("asio_udp_echo_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("asio_udp_echo_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("asio_udp_echo_server_size", bin_size // 1024) ttfw_idf.check_performance("asio_udp_echo_server_size", bin_size // 1024)
# 1. start test # 1. start test
dut1.start_app() dut1.start_app()
# 2. get the server IP address # 2. get the server IP address

View File

@@ -1,22 +1,10 @@
import re import re
import os import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag="Example_WIFI", ignore=True) @ttfw_idf.idf_example_test(env_tag="Example_WIFI", ignore=True)
def test_examples_protocol_esp_http_client(env, extra_data): def test_examples_protocol_esp_http_client(env, extra_data):
""" """
steps: | steps: |
@@ -27,8 +15,8 @@ def test_examples_protocol_esp_http_client(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "esp-http-client-example.bin") binary_file = os.path.join(dut1.app.binary_path, "esp-http-client-example.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("esp_http_client_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("esp_http_client_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("esp_http_client_bin_size", bin_size // 1024) ttfw_idf.check_performance("esp_http_client_bin_size", bin_size // 1024)
# start test # start test
dut1.start_app() dut1.start_app()
dut1.expect("Connected to AP, begin http example", timeout=30) dut1.expect("Connected to AP, begin http example", timeout=30)

View File

@@ -19,29 +19,14 @@ from __future__ import print_function
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
import os import os
import sys
try: from tiny_test_fw import Utility
import IDF import ttfw_idf
except ImportError: from idf_http_server_test import test as client
# This environment variable is expected on the host machine
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
# > make print_flash_cmd | tail -n 1 > build/download.config # > make print_flash_cmd | tail -n 1 > build/download.config
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
# Import client module
expath = os.path.dirname(os.path.realpath(__file__))
client = Utility.load_source("client", expath + "/scripts/test.py")
# Due to connectivity issues (between runner host and DUT) in the runner environment, # Due to connectivity issues (between runner host and DUT) in the runner environment,
# some of the `advanced_tests` are ignored. These tests are intended for verifying # some of the `advanced_tests` are ignored. These tests are intended for verifying
@@ -49,7 +34,7 @@ client = Utility.load_source("client", expath + "/scripts/test.py")
# of large HTTP packets and malformed requests, running multiple parallel sessions, etc. # of large HTTP packets and malformed requests, running multiple parallel sessions, etc.
# It is advised that all these tests be run locally, when making changes or adding new # It is advised that all these tests be run locally, when making changes or adding new
# features to this component. # features to this component.
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_http_server_advanced(env, extra_data): def test_examples_protocol_http_server_advanced(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("http_server", "examples/protocols/http_server/advanced_tests") dut1 = env.get_dut("http_server", "examples/protocols/http_server/advanced_tests")
@@ -57,8 +42,8 @@ def test_examples_protocol_http_server_advanced(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "tests.bin") binary_file = os.path.join(dut1.app.binary_path, "tests.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("http_server_bin_size", bin_size // 1024) ttfw_idf.check_performance("http_server_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting http_server advanced test app") Utility.console_log("Starting http_server advanced test app")

View File

@@ -21,31 +21,18 @@ from builtins import str
from builtins import range from builtins import range
import re import re
import os import os
import sys
import random import random
try: from tiny_test_fw import Utility
import IDF import ttfw_idf
except ImportError: from idf_http_server_test import adder as client
# This environment variable is expected on the host machine
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
# > make print_flash_cmd | tail -n 1 > build/download.config # > make print_flash_cmd | tail -n 1 > build/download.config
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
# Import client module
expath = os.path.dirname(os.path.realpath(__file__))
client = Utility.load_source("client", expath + "/scripts/adder.py")
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_http_server_persistence(env, extra_data): def test_examples_protocol_http_server_persistence(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("http_server", "examples/protocols/http_server/persistent_sockets") dut1 = env.get_dut("http_server", "examples/protocols/http_server/persistent_sockets")
@@ -53,8 +40,8 @@ def test_examples_protocol_http_server_persistence(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "persistent_sockets.bin") binary_file = os.path.join(dut1.app.binary_path, "persistent_sockets.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("http_server_bin_size", bin_size // 1024) ttfw_idf.check_performance("http_server_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting http_server persistance test app") Utility.console_log("Starting http_server persistance test app")

View File

@@ -20,33 +20,20 @@ from __future__ import unicode_literals
from builtins import range from builtins import range
import re import re
import os import os
import sys
import string import string
import random import random
try: from tiny_test_fw import Utility
import IDF import ttfw_idf
except ImportError: from idf_http_server_test import client
# This environment variable is expected on the host machine
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import Utility
# When running on local machine execute the following before running this script # When running on local machine execute the following before running this script
# > make app bootloader # > make app bootloader
# > make print_flash_cmd | tail -n 1 > build/download.config # > make print_flash_cmd | tail -n 1 > build/download.config
# > export TEST_FW_PATH=~/esp/esp-idf/tools/tiny-test-fw
# Import client module
expath = os.path.dirname(os.path.realpath(__file__))
client = Utility.load_source("client", expath + "/scripts/client.py")
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_http_server_simple(env, extra_data): def test_examples_protocol_http_server_simple(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("http_server", "examples/protocols/http_server/simple") dut1 = env.get_dut("http_server", "examples/protocols/http_server/simple")
@@ -54,8 +41,8 @@ def test_examples_protocol_http_server_simple(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "simple.bin") binary_file = os.path.join(dut1.app.binary_path, "simple.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("http_server_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("http_server_bin_size", bin_size // 1024) ttfw_idf.check_performance("http_server_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
Utility.console_log("Starting http_server simple test app") Utility.console_log("Starting http_server simple test app")

View File

@@ -1,21 +1,10 @@
import re import re
import os import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag="Example_WIFI", ignore=True) @ttfw_idf.idf_example_test(env_tag="Example_WIFI", ignore=True)
def test_examples_protocol_https_request(env, extra_data): def test_examples_protocol_https_request(env, extra_data):
""" """
steps: | steps: |
@@ -27,8 +16,8 @@ def test_examples_protocol_https_request(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "https_request.bin") binary_file = os.path.join(dut1.app.binary_path, "https_request.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("https_request_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("https_request_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("https_request_bin_size", bin_size // 1024) ttfw_idf.check_performance("https_request_bin_size", bin_size // 1024)
# start test # start test
dut1.start_app() dut1.start_app()
dut1.expect("Connection established...", timeout=30) dut1.expect("Connection established...", timeout=30)

View File

@@ -1,6 +1,5 @@
import re import re
import os import os
import sys
import socket import socket
import time import time
import struct import struct
@@ -8,21 +7,8 @@ import dpkt
import dpkt.dns import dpkt.dns
from threading import Thread from threading import Thread
from tiny_test_fw import DUT
# this is a test case write with tiny-test-fw. import ttfw_idf
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
try:
import IDF
except ImportError:
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
g_run_server = True g_run_server = True
g_done = False g_done = False
@@ -76,7 +62,7 @@ def mdns_server(esp_host):
continue continue
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_mdns(env, extra_data): def test_examples_protocol_mdns(env, extra_data):
global g_run_server global g_run_server
""" """
@@ -90,8 +76,8 @@ def test_examples_protocol_mdns(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "mdns-test.bin") binary_file = os.path.join(dut1.app.binary_path, "mdns-test.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("mdns-test_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("mdns-test_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("mdns-test_bin_size", bin_size // 1024) ttfw_idf.check_performance("mdns-test_bin_size", bin_size // 1024)
# 1. start mdns application # 1. start mdns application
dut1.start_app() dut1.start_app()
# 2. get the dut host name (and IP address) # 2. get the dut host name (and IP address)

View File

@@ -8,20 +8,8 @@ import ssl
import paho.mqtt.client as mqtt import paho.mqtt.client as mqtt
from threading import Thread, Event from threading import Thread, Event
from tiny_test_fw import DUT
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
event_client_connected = Event() event_client_connected = Event()
@@ -53,7 +41,7 @@ def on_message(client, userdata, msg):
message_log += "Received data:" + msg.topic + " " + payload + "\n" message_log += "Received data:" + msg.topic + " " + payload + "\n"
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_mqtt_ssl(env, extra_data): def test_examples_protocol_mqtt_ssl(env, extra_data):
broker_url = "" broker_url = ""
broker_port = 0 broker_port = 0
@@ -68,9 +56,9 @@ def test_examples_protocol_mqtt_ssl(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "mqtt_ssl.bin") binary_file = os.path.join(dut1.app.binary_path, "mqtt_ssl.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("mqtt_ssl_bin_size", "{}KB" ttfw_idf.log_performance("mqtt_ssl_bin_size", "{}KB"
.format(bin_size // 1024)) .format(bin_size // 1024))
IDF.check_performance("mqtt_ssl_size", bin_size // 1024) ttfw_idf.check_performance("mqtt_ssl_size", bin_size // 1024)
# Look for host:port in sdkconfig # Look for host:port in sdkconfig
try: try:
value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"]) value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"])

View File

@@ -6,20 +6,8 @@ from threading import Thread
import struct import struct
import time import time
from tiny_test_fw import DUT
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
msgid = -1 msgid = -1
@@ -65,7 +53,7 @@ def mqqt_server_sketch(my_ip, port):
print("server closed") print("server closed")
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_mqtt_qos1(env, extra_data): def test_examples_protocol_mqtt_qos1(env, extra_data):
global msgid global msgid
""" """
@@ -79,8 +67,8 @@ def test_examples_protocol_mqtt_qos1(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "mqtt_tcp.bin") binary_file = os.path.join(dut1.app.binary_path, "mqtt_tcp.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("mqtt_tcp_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("mqtt_tcp_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("mqtt_tcp_size", bin_size // 1024) ttfw_idf.check_performance("mqtt_tcp_size", bin_size // 1024)
# 1. start mqtt broker sketch # 1. start mqtt broker sketch
host_ip = get_my_ip() host_ip = get_my_ip()
thread1 = Thread(target=mqqt_server_sketch, args=(host_ip,1883)) thread1 = Thread(target=mqqt_server_sketch, args=(host_ip,1883))

View File

@@ -7,20 +7,8 @@ import sys
import paho.mqtt.client as mqtt import paho.mqtt.client as mqtt
from threading import Thread, Event from threading import Thread, Event
from tiny_test_fw import DUT
try: import ttfw_idf
import IDF
except Exception:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
event_client_connected = Event() event_client_connected = Event()
event_stop_client = Event() event_stop_client = Event()
@@ -51,7 +39,7 @@ def on_message(client, userdata, msg):
message_log += "Received data:" + msg.topic + " " + payload + "\n" message_log += "Received data:" + msg.topic + " " + payload + "\n"
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_mqtt_ws(env, extra_data): def test_examples_protocol_mqtt_ws(env, extra_data):
broker_url = "" broker_url = ""
broker_port = 0 broker_port = 0
@@ -66,8 +54,8 @@ def test_examples_protocol_mqtt_ws(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "mqtt_websocket.bin") binary_file = os.path.join(dut1.app.binary_path, "mqtt_websocket.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("mqtt_websocket_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("mqtt_websocket_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("mqtt_websocket_size", bin_size // 1024) ttfw_idf.check_performance("mqtt_websocket_size", bin_size // 1024)
# Look for host:port in sdkconfig # Look for host:port in sdkconfig
try: try:
value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"]) value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"])

View File

@@ -8,20 +8,8 @@ import ssl
import paho.mqtt.client as mqtt import paho.mqtt.client as mqtt
from threading import Thread, Event from threading import Thread, Event
from tiny_test_fw import DUT
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
event_client_connected = Event() event_client_connected = Event()
event_stop_client = Event() event_stop_client = Event()
@@ -52,7 +40,7 @@ def on_message(client, userdata, msg):
message_log += "Received data:" + msg.topic + " " + payload + "\n" message_log += "Received data:" + msg.topic + " " + payload + "\n"
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_mqtt_wss(env, extra_data): def test_examples_protocol_mqtt_wss(env, extra_data):
broker_url = "" broker_url = ""
broker_port = 0 broker_port = 0
@@ -67,8 +55,8 @@ def test_examples_protocol_mqtt_wss(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "mqtt_websocket_secure.bin") binary_file = os.path.join(dut1.app.binary_path, "mqtt_websocket_secure.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("mqtt_websocket_secure_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("mqtt_websocket_secure_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("mqtt_websocket_secure_size", bin_size // 1024) ttfw_idf.check_performance("mqtt_websocket_secure_size", bin_size // 1024)
# Look for host:port in sdkconfig # Look for host:port in sdkconfig
try: try:
value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"]) value = re.search(r'\:\/\/([^:]+)\:([0-9]+)', dut1.app.get_sdkconfig()["CONFIG_BROKER_URI"])

View File

@@ -1,18 +1,10 @@
import re import re
import os import os
import sys
import IDF
# this is a test case write with tiny-test-fw. import ttfw_idf
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
@IDF.idf_example_test(env_tag="Example_WIFI", ignore=True) @ttfw_idf.idf_example_test(env_tag="Example_WIFI", ignore=True)
def test_examples_protocol_websocket(env, extra_data): def test_examples_protocol_websocket(env, extra_data):
""" """
steps: | steps: |
@@ -24,8 +16,8 @@ def test_examples_protocol_websocket(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "websocket-example.bin") binary_file = os.path.join(dut1.app.binary_path, "websocket-example.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("websocket_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("websocket_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("websocket_bin_size", bin_size // 1024) ttfw_idf.check_performance("websocket_bin_size", bin_size // 1024)
# start test # start test
dut1.start_app() dut1.start_app()
dut1.expect("Waiting for wifi ...") dut1.expect("Waiting for wifi ...")

View File

@@ -17,30 +17,16 @@
from __future__ import print_function from __future__ import print_function
import re import re
import os import os
import sys
import time import time
try: import ttfw_idf
import IDF import esp_prov
except ImportError:
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
try:
import esp_prov
except ImportError:
esp_prov_path = os.getenv("IDF_PATH") + "/tools/esp_prov"
if esp_prov_path and esp_prov_path not in sys.path:
sys.path.insert(0, esp_prov_path)
import esp_prov
# Have esp_prov throw exception # Have esp_prov throw exception
esp_prov.config_throw_except = True esp_prov.config_throw_except = True
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_examples_provisioning_ble(env, extra_data): def test_examples_provisioning_ble(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("ble_prov", "examples/provisioning/ble_prov") dut1 = env.get_dut("ble_prov", "examples/provisioning/ble_prov")
@@ -48,8 +34,8 @@ def test_examples_provisioning_ble(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "ble_prov.bin") binary_file = os.path.join(dut1.app.binary_path, "ble_prov.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("ble_prov_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("ble_prov_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("ble_prov_bin_size", bin_size // 1024) ttfw_idf.check_performance("ble_prov_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
dut1.start_app() dut1.start_app()

View File

@@ -1,8 +1,8 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
# Binary is larger than default size # Binary is larger than default size
CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM=y

View File

@@ -1,8 +1,8 @@
# Override some defaults so BT stack is enabled and # Override some defaults so BT stack is enabled and
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n
CONFIG_BTDM_CTRL_MODE_BTDM= CONFIG_BTDM_CTRL_MODE_BTDM=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y
## For Bluedroid as binary is larger than default size ## For Bluedroid as binary is larger than default size

View File

@@ -17,30 +17,16 @@
from __future__ import print_function from __future__ import print_function
import re import re
import os import os
import sys
import time import time
try: import ttfw_idf
import IDF import esp_prov
except ImportError:
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
try:
import esp_prov
except ImportError:
esp_prov_path = os.getenv("IDF_PATH") + "/tools/esp_prov"
if esp_prov_path and esp_prov_path not in sys.path:
sys.path.insert(0, esp_prov_path)
import esp_prov
# Have esp_prov throw exception # Have esp_prov throw exception
esp_prov.config_throw_except = True esp_prov.config_throw_except = True
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_examples_wifi_prov_mgr(env, extra_data): def test_examples_wifi_prov_mgr(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("wifi_prov_mgr", "examples/provisioning/manager") dut1 = env.get_dut("wifi_prov_mgr", "examples/provisioning/manager")
@@ -48,8 +34,8 @@ def test_examples_wifi_prov_mgr(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "wifi_prov_mgr.bin") binary_file = os.path.join(dut1.app.binary_path, "wifi_prov_mgr.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("wifi_prov_mgr_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("wifi_prov_mgr_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("wifi_prov_mgr_bin_size", bin_size // 1024) ttfw_idf.check_performance("wifi_prov_mgr_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
dut1.start_app() dut1.start_app()

View File

@@ -17,38 +17,17 @@
from __future__ import print_function from __future__ import print_function
import re import re
import os import os
import sys
import time import time
try: import ttfw_idf
import IDF import esp_prov
except ImportError: import wifi_tools
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
try:
import esp_prov
except ImportError:
esp_prov_path = os.getenv("IDF_PATH") + "/tools/esp_prov"
if esp_prov_path and esp_prov_path not in sys.path:
sys.path.insert(0, esp_prov_path)
import esp_prov
try:
import wifi_tools
except ImportError:
wifi_tools_path = os.getenv("IDF_PATH") + "/examples/provisioning/softap_prov/utils"
if wifi_tools_path and wifi_tools_path not in sys.path:
sys.path.insert(0, wifi_tools_path)
import wifi_tools
# Have esp_prov throw exception # Have esp_prov throw exception
esp_prov.config_throw_except = True esp_prov.config_throw_except = True
@IDF.idf_example_test(env_tag="Example_WIFI_BT") @ttfw_idf.idf_example_test(env_tag="Example_WIFI_BT")
def test_examples_provisioning_softap(env, extra_data): def test_examples_provisioning_softap(env, extra_data):
# Acquire DUT # Acquire DUT
dut1 = env.get_dut("softap_prov", "examples/provisioning/softap_prov") dut1 = env.get_dut("softap_prov", "examples/provisioning/softap_prov")
@@ -56,8 +35,8 @@ def test_examples_provisioning_softap(env, extra_data):
# Get binary file # Get binary file
binary_file = os.path.join(dut1.app.binary_path, "softap_prov.bin") binary_file = os.path.join(dut1.app.binary_path, "softap_prov.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("softap_prov_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("softap_prov_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("softap_prov_bin_size", bin_size // 1024) ttfw_idf.check_performance("softap_prov_bin_size", bin_size // 1024)
# Upload binary and start testing # Upload binary and start testing
dut1.start_app() dut1.start_app()

View File

@@ -1,14 +1,5 @@
from __future__ import print_function from __future__ import print_function
import os import ttfw_idf
import sys
try:
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
# To prepare a test runner for this example: # To prepare a test runner for this example:
@@ -18,7 +9,7 @@ except ImportError:
# espefuse.py --do-not-confirm -p $ESPPORT burn_efuse FLASH_CRYPT_CONFIG 0xf # espefuse.py --do-not-confirm -p $ESPPORT burn_efuse FLASH_CRYPT_CONFIG 0xf
# espefuse.py --do-not-confirm -p $ESPPORT burn_efuse FLASH_CRYPT_CNT 0x1 # espefuse.py --do-not-confirm -p $ESPPORT burn_efuse FLASH_CRYPT_CNT 0x1
# espefuse.py --do-not-confirm -p $ESPPORT burn_key flash_encryption key.bin # espefuse.py --do-not-confirm -p $ESPPORT burn_key flash_encryption key.bin
@IDF.idf_example_test(env_tag='Example_Flash_Encryption') @ttfw_idf.idf_example_test(env_tag='Example_Flash_Encryption')
def test_examples_security_flash_encryption(env, extra_data): def test_examples_security_flash_encryption(env, extra_data):
dut = env.get_dut('flash_encryption', 'examples/security/flash_encryption') dut = env.get_dut('flash_encryption', 'examples/security/flash_encryption')
# start test # start test

View File

@@ -1,17 +1,9 @@
from __future__ import print_function from __future__ import print_function
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_ExtFlash') @ttfw_idf.idf_example_test(env_tag='Example_ExtFlash')
def test_examples_storage_ext_flash_fatfs(env, extra_data): def test_examples_storage_ext_flash_fatfs(env, extra_data):
dut = env.get_dut('ext_flash_fatfs', 'examples/storage/ext_flash_fatfs') dut = env.get_dut('ext_flash_fatfs', 'examples/storage/ext_flash_fatfs')
dut.start_app() dut.start_app()

View File

@@ -3,16 +3,10 @@ import os
import sys import sys
import subprocess import subprocess
try: import ttfw_idf
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_examples_parttool(env, extra_data): def test_examples_parttool(env, extra_data):
dut = env.get_dut('parttool', 'examples/storage/parttool') dut = env.get_dut('parttool', 'examples/storage/parttool')
dut.start_app(False) dut.start_app(False)

View File

@@ -1,18 +1,11 @@
from __future__ import print_function from __future__ import print_function
import os import os
import sys
import hashlib import hashlib
try: import ttfw_idf
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_examples_spiffsgen(env, extra_data): def test_examples_spiffsgen(env, extra_data):
# Test with default build configurations # Test with default build configurations
dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen') dut = env.get_dut('spiffsgen', 'examples/storage/spiffsgen')

View File

@@ -1,17 +1,9 @@
from __future__ import print_function from __future__ import print_function
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_examples_system_cpp_exceptions(env, extra_data): def test_examples_system_cpp_exceptions(env, extra_data):
dut = env.get_dut('cpp_exceptions_example', 'examples/system/cpp_exceptions') dut = env.get_dut('cpp_exceptions_example', 'examples/system/cpp_exceptions')
# start test # start test

View File

@@ -1,18 +1,6 @@
from __future__ import print_function from __future__ import print_function
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
# Timer events # Timer events
TIMER_EVENT_LIMIT = 3 TIMER_EVENT_LIMIT = 3
@@ -91,7 +79,7 @@ def _test_iteration_events(dut):
print("Deleted task event source") print("Deleted task event source")
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_default_event_loop_example(env, extra_data): def test_default_event_loop_example(env, extra_data):
dut = env.get_dut('default_event_loop', 'examples/system/esp_event/default_event_loop') dut = env.get_dut('default_event_loop', 'examples/system/esp_event/default_event_loop')

View File

@@ -1,18 +1,6 @@
from __future__ import print_function from __future__ import print_function
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
TASK_ITERATION_LIMIT = 10 TASK_ITERATION_LIMIT = 10
@@ -20,7 +8,7 @@ TASK_ITERATION_POSTING = "posting TASK_EVENTS:TASK_ITERATION_EVENT to {}, iterat
TASK_ITERATION_HANDLING = "handling TASK_EVENTS:TASK_ITERATION_EVENT from {}, iteration {}" TASK_ITERATION_HANDLING = "handling TASK_EVENTS:TASK_ITERATION_EVENT from {}, iteration {}"
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_user_event_loops_example(env, extra_data): def test_user_event_loops_example(env, extra_data):
dut = env.get_dut('user_event_loops', 'examples/system/esp_event/user_event_loops') dut = env.get_dut('user_event_loops', 'examples/system/esp_event/user_event_loops')

View File

@@ -1,19 +1,7 @@
from __future__ import print_function from __future__ import print_function
import re import re
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
STARTING_TIMERS_REGEX = re.compile(r'Started timers, time since boot: (\d+) us') STARTING_TIMERS_REGEX = re.compile(r'Started timers, time since boot: (\d+) us')
@@ -37,7 +25,7 @@ LIGHT_SLEEP_TIME = 500000
ONE_SHOT_TIMER_PERIOD = 5000000 ONE_SHOT_TIMER_PERIOD = 5000000
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_examples_system_esp_timer(env, extra_data): def test_examples_system_esp_timer(env, extra_data):
dut = env.get_dut('esp_timer_example', 'examples/system/esp_timer') dut = env.get_dut('esp_timer_example', 'examples/system/esp_timer')
# start test # start test

View File

@@ -1,24 +1,12 @@
from __future__ import print_function from __future__ import print_function
import os
import sys
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
STATS_TASK_ITERS = 3 STATS_TASK_ITERS = 3
STATS_TASK_EXPECT = "Real time stats obtained" STATS_TASK_EXPECT = "Real time stats obtained"
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_real_time_stats_example(env, extra_data): def test_real_time_stats_example(env, extra_data):
dut = env.get_dut('real_time_stats', 'examples/system/freertos/real_time_stats') dut = env.get_dut('real_time_stats', 'examples/system/freertos/real_time_stats')
dut.start_app() dut.start_app()

View File

@@ -1,6 +1,6 @@
CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_SPIRAM_BOOT_INIT=y CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND= CONFIG_SPIRAM_IGNORE_NOTFOUND=n
CONFIG_SPIRAM_USE_MALLOC=y CONFIG_SPIRAM_USE_MALLOC=y
CONFIG_SPIRAM_TYPE_AUTO=y CONFIG_SPIRAM_TYPE_AUTO=y
CONFIG_SPIRAM_SIZE=-1 CONFIG_SPIRAM_SIZE=-1

View File

@@ -1,16 +1,8 @@
from __future__ import print_function from __future__ import print_function
import re import re
import os
import sys
import time import time
try: import ttfw_idf
import IDF
except ImportError:
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
ENTERING_SLEEP_STR = 'Entering light sleep' ENTERING_SLEEP_STR = 'Entering light sleep'
EXIT_SLEEP_REGEX = re.compile(r'Returned from light sleep, reason: (\w+), t=(\d+) ms, slept for (\d+) ms') EXIT_SLEEP_REGEX = re.compile(r'Returned from light sleep, reason: (\w+), t=(\d+) ms, slept for (\d+) ms')
@@ -19,7 +11,7 @@ WAITING_FOR_GPIO_STR = 'Waiting for GPIO0 to go high...'
WAKEUP_INTERVAL_MS = 2000 WAKEUP_INTERVAL_MS = 2000
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_examples_system_light_sleep(env, extra_data): def test_examples_system_light_sleep(env, extra_data):
dut = env.get_dut('light_sleep_example', 'examples/system/light_sleep') dut = env.get_dut('light_sleep_example', 'examples/system/light_sleep')
dut.start_app() dut.start_app()

View File

@@ -3,20 +3,10 @@ import os
import sys import sys
import subprocess import subprocess
try: import ttfw_idf
import IDF
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv('TEST_FW_PATH')
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
@IDF.idf_example_test(env_tag='Example_WIFI') @ttfw_idf.idf_example_test(env_tag='Example_WIFI')
def test_otatool_example(env, extra_data): def test_otatool_example(env, extra_data):
dut = env.get_dut('otatool', 'examples/system/ota/otatool') dut = env.get_dut('otatool', 'examples/system/ota/otatool')

View File

@@ -1,25 +1,13 @@
import re import re
import os import os
import sys
import socket import socket
import BaseHTTPServer import BaseHTTPServer
import SimpleHTTPServer import SimpleHTTPServer
from threading import Thread from threading import Thread
import ssl import ssl
try: from tiny_test_fw import DUT
import IDF import ttfw_idf
except ImportError:
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
server_cert = "-----BEGIN CERTIFICATE-----\n" \ server_cert = "-----BEGIN CERTIFICATE-----\n" \
"MIIDXTCCAkWgAwIBAgIJAP4LF7E72HakMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n"\ "MIIDXTCCAkWgAwIBAgIJAP4LF7E72HakMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n"\
@@ -107,7 +95,7 @@ def start_https_server(ota_image_dir, server_ip, server_port):
httpd.serve_forever() httpd.serve_forever()
@IDF.idf_example_test(env_tag="Example_WIFI") @ttfw_idf.idf_example_test(env_tag="Example_WIFI")
def test_examples_protocol_simple_ota_example(env, extra_data): def test_examples_protocol_simple_ota_example(env, extra_data):
""" """
steps: | steps: |
@@ -119,8 +107,8 @@ def test_examples_protocol_simple_ota_example(env, extra_data):
# check and log bin size # check and log bin size
binary_file = os.path.join(dut1.app.binary_path, "simple_ota.bin") binary_file = os.path.join(dut1.app.binary_path, "simple_ota.bin")
bin_size = os.path.getsize(binary_file) bin_size = os.path.getsize(binary_file)
IDF.log_performance("simple_ota_bin_size", "{}KB".format(bin_size // 1024)) ttfw_idf.log_performance("simple_ota_bin_size", "{}KB".format(bin_size // 1024))
IDF.check_performance("simple_ota_bin_size", bin_size // 1024) ttfw_idf.check_performance("simple_ota_bin_size", bin_size // 1024)
# start test # start test
host_ip = get_my_ip() host_ip = get_my_ip()
thread1 = Thread(target=start_https_server, args=(dut1.app.binary_path, host_ip, 8000)) thread1 = Thread(target=start_https_server, args=(dut1.app.binary_path, host_ip, 8000))

View File

@@ -23,6 +23,6 @@ CONFIG_SYSVIEW_EVT_IDLE_ENABLE=y
CONFIG_SYSVIEW_EVT_TIMER_ENTER_ENABLE=y CONFIG_SYSVIEW_EVT_TIMER_ENTER_ENABLE=y
CONFIG_SYSVIEW_EVT_TIMER_EXIT_ENABLE=y CONFIG_SYSVIEW_EVT_TIMER_EXIT_ENABLE=y
# Disable color output in logs # Disable color output in logs
CONFIG_LOG_COLORS= CONFIG_LOG_COLORS=n
# Enable heap tracing to host # Enable heap tracing to host
CONFIG_HEAP_TRACING_TOHOST=y CONFIG_HEAP_TRACING_TOHOST=y

View File

@@ -1 +1 @@
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n

View File

@@ -26,33 +26,13 @@ from builtins import range
from builtins import object from builtins import object
import re import re
import os import os
import sys
import time import time
import subprocess import subprocess
try: from tiny_test_fw import TinyFW, DUT, Utility
import IDF import ttfw_idf
except ImportError: from idf_iperf_test_util import (Attenuator, PowerControl, LineChart, TestReport)
# this is a test case write with tiny-test-fw.
# to run test cases outside tiny-test-fw,
# we need to set environment variable `TEST_FW_PATH`,
# then get and insert `TEST_FW_PATH` to sys path before import FW module
test_fw_path = os.getenv("TEST_FW_PATH")
if test_fw_path and test_fw_path not in sys.path:
sys.path.insert(0, test_fw_path)
import IDF
import DUT
import TinyFW
import Utility
from Utility import (Attenuator, PowerControl, LineChart)
try:
from test_report import (ThroughputForConfigsReport, ThroughputVsRssiReport)
except ImportError:
# add current folder to system path for importing test_report
sys.path.append(os.path.dirname(__file__))
from test_report import (ThroughputForConfigsReport, ThroughputVsRssiReport)
# configurations # configurations
TEST_TIME = TEST_TIMEOUT = 60 TEST_TIME = TEST_TIMEOUT = 60
@@ -466,32 +446,7 @@ class IperfTestUtility(object):
return ret return ret
def build_iperf_with_config(config_name): @ttfw_idf.idf_example_test(env_tag="Example_ShieldBox_Basic", category="stress")
"""
we need to build iperf example with different configurations.
:param config_name: sdkconfig we want to build
"""
# switch to iperf example path before build when we're running test with Runner
example_path = os.path.dirname(__file__)
cwd = os.getcwd()
if cwd != example_path and example_path:
os.chdir(example_path)
try:
subprocess.check_call("make clean > /dev/null", shell=True)
subprocess.check_call(["cp", "sdkconfig.defaults.{}".format(config_name), "sdkconfig.defaults"])
subprocess.check_call(["rm", "-f", "sdkconfig"])
subprocess.check_call("make defconfig > /dev/null", shell=True)
# save sdkconfig to generate config comparision report
subprocess.check_call(["cp", "sdkconfig", "sdkconfig.{}".format(config_name)])
subprocess.check_call("make -j5 > /dev/null", shell=True)
subprocess.check_call("make print_flash_cmd | tail -n 1 > build/download.config", shell=True)
finally:
os.chdir(cwd)
@IDF.idf_example_test(env_tag="Example_ShieldBox_Basic", category="stress")
def test_wifi_throughput_with_different_configs(env, extra_data): def test_wifi_throughput_with_different_configs(env, extra_data):
""" """
steps: | steps: |
@@ -511,13 +466,12 @@ def test_wifi_throughput_with_different_configs(env, extra_data):
sdkconfig_files = dict() sdkconfig_files = dict()
for config_name in CONFIG_NAME_PATTERN.findall(config_names_raw): for config_name in CONFIG_NAME_PATTERN.findall(config_names_raw):
# 1. build config # 1. get the config
build_iperf_with_config(config_name)
sdkconfig_files[config_name] = os.path.join(os.path.dirname(__file__), sdkconfig_files[config_name] = os.path.join(os.path.dirname(__file__),
"sdkconfig.{}".format(config_name)) "sdkconfig.ci.{}".format(config_name))
# 2. get DUT and download # 2. get DUT and download
dut = env.get_dut("iperf", "examples/wifi/iperf") dut = env.get_dut("iperf", "examples/wifi/iperf", app_config_name=config_name)
dut.start_app() dut.start_app()
dut.expect("esp32>") dut.expect("esp32>")
@@ -544,12 +498,12 @@ def test_wifi_throughput_with_different_configs(env, extra_data):
env.close_dut("iperf") env.close_dut("iperf")
# 5. generate report # 5. generate report
report = ThroughputForConfigsReport(os.path.join(env.log_path, "ThroughputForConfigsReport"), report = TestReport.ThroughputForConfigsReport(os.path.join(env.log_path, "ThroughputForConfigsReport"),
ap_info["ssid"], test_result, sdkconfig_files) ap_info["ssid"], test_result, sdkconfig_files)
report.generate_report() report.generate_report()
@IDF.idf_example_test(env_tag="Example_ShieldBox", category="stress") @ttfw_idf.idf_example_test(env_tag="Example_ShieldBox", category="stress")
def test_wifi_throughput_vs_rssi(env, extra_data): def test_wifi_throughput_vs_rssi(env, extra_data):
""" """
steps: | steps: |
@@ -571,15 +525,12 @@ def test_wifi_throughput_vs_rssi(env, extra_data):
"udp_rx": TestResult("udp", "rx", BEST_PERFORMANCE_CONFIG), "udp_rx": TestResult("udp", "rx", BEST_PERFORMANCE_CONFIG),
} }
# 1. build config # 1. get DUT and download
build_iperf_with_config(BEST_PERFORMANCE_CONFIG) dut = env.get_dut("iperf", "examples/wifi/iperf", app_config_name=BEST_PERFORMANCE_CONFIG)
# 2. get DUT and download
dut = env.get_dut("iperf", "examples/wifi/iperf")
dut.start_app() dut.start_app()
dut.expect("esp32>") dut.expect("esp32>")
# 3. run test for each required att value # 2. run test for each required att value
for ap_info in ap_list: for ap_info in ap_list:
test_utility = IperfTestUtility(dut, BEST_PERFORMANCE_CONFIG, ap_info["ssid"], ap_info["password"], test_utility = IperfTestUtility(dut, BEST_PERFORMANCE_CONFIG, ap_info["ssid"], ap_info["password"],
pc_nic_ip, pc_iperf_log_file, test_result) pc_nic_ip, pc_iperf_log_file, test_result)
@@ -597,16 +548,16 @@ def test_wifi_throughput_vs_rssi(env, extra_data):
assert Attenuator.set_att(att_port, atten_val) is True assert Attenuator.set_att(att_port, atten_val) is True
test_utility.run_all_cases(atten_val) test_utility.run_all_cases(atten_val)
# 4. check test results # 3. check test results
env.close_dut("iperf") env.close_dut("iperf")
# 5. generate report # 4. generate report
report = ThroughputVsRssiReport(os.path.join(env.log_path, "ThroughputVsRssiReport"), report = TestReport.ThroughputVsRssiReport(os.path.join(env.log_path, "ThroughputVsRssiReport"),
test_result) test_result)
report.generate_report() report.generate_report()
@IDF.idf_example_test(env_tag="Example_ShieldBox_Basic") @ttfw_idf.idf_example_test(env_tag="Example_ShieldBox_Basic")
def test_wifi_throughput_basic(env, extra_data): def test_wifi_throughput_basic(env, extra_data):
""" """
steps: | steps: |
@@ -620,15 +571,12 @@ def test_wifi_throughput_basic(env, extra_data):
"password": env.get_variable("ap_password"), "password": env.get_variable("ap_password"),
} }
# 1. build iperf with best config # 1. get DUT
build_iperf_with_config(BEST_PERFORMANCE_CONFIG) dut = env.get_dut("iperf", "examples/wifi/iperf", app_config_name=BEST_PERFORMANCE_CONFIG)
# 2. get DUT
dut = env.get_dut("iperf", "examples/wifi/iperf")
dut.start_app() dut.start_app()
dut.expect("esp32>") dut.expect("esp32>")
# 3. preparing # 2. preparing
test_result = { test_result = {
"tcp_tx": TestResult("tcp", "tx", BEST_PERFORMANCE_CONFIG), "tcp_tx": TestResult("tcp", "tx", BEST_PERFORMANCE_CONFIG),
"tcp_rx": TestResult("tcp", "rx", BEST_PERFORMANCE_CONFIG), "tcp_rx": TestResult("tcp", "rx", BEST_PERFORMANCE_CONFIG),
@@ -639,23 +587,23 @@ def test_wifi_throughput_basic(env, extra_data):
test_utility = IperfTestUtility(dut, BEST_PERFORMANCE_CONFIG, ap_info["ssid"], test_utility = IperfTestUtility(dut, BEST_PERFORMANCE_CONFIG, ap_info["ssid"],
ap_info["password"], pc_nic_ip, pc_iperf_log_file, test_result) ap_info["password"], pc_nic_ip, pc_iperf_log_file, test_result)
# 4. run test for TCP Tx, Rx and UDP Tx, Rx # 3. run test for TCP Tx, Rx and UDP Tx, Rx
for _ in range(RETRY_COUNT_FOR_BEST_PERFORMANCE): for _ in range(RETRY_COUNT_FOR_BEST_PERFORMANCE):
test_utility.run_all_cases(0) test_utility.run_all_cases(0)
# 5. log performance and compare with pass standard # 4. log performance and compare with pass standard
performance_items = [] performance_items = []
for throughput_type in test_result: for throughput_type in test_result:
IDF.log_performance("{}_throughput".format(throughput_type), ttfw_idf.log_performance("{}_throughput".format(throughput_type),
"{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput())) "{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput()))
performance_items.append(["{}_throughput".format(throughput_type), performance_items.append(["{}_throughput".format(throughput_type),
"{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput())]) "{:.02f} Mbps".format(test_result[throughput_type].get_best_throughput())])
# save to report # 5. save to report
TinyFW.JunitReport.update_performance(performance_items) TinyFW.JunitReport.update_performance(performance_items)
# do check after logging, otherwise test will exit immediately if check fail, some performance can't be logged. # do check after logging, otherwise test will exit immediately if check fail, some performance can't be logged.
for throughput_type in test_result: for throughput_type in test_result:
IDF.check_performance("{}_throughput".format(throughput_type), ttfw_idf.check_performance("{}_throughput".format(throughput_type),
test_result[throughput_type].get_best_throughput()) test_result[throughput_type].get_best_throughput())
env.close_dut("iperf") env.close_dut("iperf")

View File

@@ -2,5 +2,5 @@ CONFIG_MEMMAP_SMP=y
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n

View File

@@ -1,11 +1,11 @@
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=12 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=12
@@ -21,5 +21,5 @@ CONFIG_LWIP_TCP_WND_DEFAULT=11488
CONFIG_LWIP_TCP_RECVMBOX_SIZE=12 CONFIG_LWIP_TCP_RECVMBOX_SIZE=12
CONFIG_LWIP_UDP_RECVMBOX_SIZE=12 CONFIG_LWIP_UDP_RECVMBOX_SIZE=12
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n

View File

@@ -1,11 +1,11 @@
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
@@ -21,5 +21,5 @@ CONFIG_LWIP_TCP_WND_DEFAULT=11488
CONFIG_LWIP_TCP_RECVMBOX_SIZE=12 CONFIG_LWIP_TCP_RECVMBOX_SIZE=12
CONFIG_LWIP_UDP_RECVMBOX_SIZE=12 CONFIG_LWIP_UDP_RECVMBOX_SIZE=12
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n

View File

@@ -1,11 +1,11 @@
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
@@ -21,5 +21,5 @@ CONFIG_LWIP_TCP_WND_DEFAULT=32768
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n

View File

@@ -1,11 +1,11 @@
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
@@ -21,5 +21,5 @@ CONFIG_LWIP_TCP_WND_DEFAULT=65535
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n

View File

@@ -1,11 +1,11 @@
CONFIG_MEMMAP_SMP=y CONFIG_MEMMAP_SMP=y
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=4096
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
@@ -21,7 +21,7 @@ CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

View File

@@ -11,15 +11,15 @@ CONFIG_ESP32_WIFI_RX_BA_WIN=32
CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_UNICORE=y
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534 CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

View File

@@ -12,18 +12,18 @@ CONFIG_ESP32_WIFI_TX_BA_WIN=32
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=32 CONFIG_ESP32_WIFI_RX_BA_WIN=32
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534 CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

View File

@@ -12,18 +12,18 @@ CONFIG_ESP32_WIFI_TX_BA_WIN=32
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=32 CONFIG_ESP32_WIFI_RX_BA_WIN=32
CONFIG_FREERTOS_UNICORE= CONFIG_FREERTOS_UNICORE=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_INT_WDT= CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT= CONFIG_ESP_TASK_WDT=n
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534 CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_LWIP_ETHARP_TRUST_IP_MAC=n
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y CONFIG_ESPTOOLPY_FLASHFREQ_80M=y

View File

@@ -621,6 +621,11 @@ clean: app-clean bootloader-clean config-clean ldgen-clean
# #
# This only works for components inside IDF_PATH # This only works for components inside IDF_PATH
check-submodules: check-submodules:
# for internal use:
# skip submodule check if running on Gitlab CI and job is configured as not clone submodules
ifeq ($(IDF_SKIP_CHECK_SUBMODULES),1)
@echo "skip submodule check on internal CI"
else
# Check if .gitmodules exists, otherwise skip submodule check, assuming flattened structure # Check if .gitmodules exists, otherwise skip submodule check, assuming flattened structure
ifneq ("$(wildcard ${IDF_PATH}/.gitmodules)","") ifneq ("$(wildcard ${IDF_PATH}/.gitmodules)","")
@@ -648,7 +653,7 @@ endef
# so the argument is suitable for use with 'git submodule' commands # so the argument is suitable for use with 'git submodule' commands
$(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUBMODULES))),$(eval $(call GenerateSubmoduleCheckTarget,$(submodule)))) $(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUBMODULES))),$(eval $(call GenerateSubmoduleCheckTarget,$(submodule))))
endif # End check for .gitmodules existence endif # End check for .gitmodules existence
endif
# PHONY target to list components in the build and their paths # PHONY target to list components in the build and their paths
list-components: list-components:

Some files were not shown because too many files have changed in this diff Show More