From 211c54cef3448f89febe71f9665767d533ecfc9b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sun, 24 Nov 2019 23:51:39 +0100 Subject: [PATCH] examples/wifi/iperf: fix test not finding any configs Regression from ebd7004 --- examples/wifi/iperf/iperf_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/wifi/iperf/iperf_test.py b/examples/wifi/iperf/iperf_test.py index 074cc7a5f..882314eef 100644 --- a/examples/wifi/iperf/iperf_test.py +++ b/examples/wifi/iperf/iperf_test.py @@ -47,7 +47,7 @@ FAILED_TO_SCAN_RSSI = -97 INVALID_HEAP_SIZE = 0xFFFFFFFF PC_IPERF_TEMP_LOG_FILE = ".tmp_iperf.log" -CONFIG_NAME_PATTERN = re.compile(r"sdkconfig\.defaults\.(.+)") +CONFIG_NAME_PATTERN = re.compile(r"sdkconfig\.ci\.(.+)") # We need to auto compare the difference between adjacent configs (01 -> 00, 02 -> 01, ...) and put them to reports. # Using numbers for config will make this easy. @@ -461,11 +461,14 @@ def test_wifi_throughput_with_different_configs(env, extra_data): } config_names_raw = subprocess.check_output(["ls", os.path.dirname(os.path.abspath(__file__))]) + config_names = CONFIG_NAME_PATTERN.findall(config_names_raw) + if not config_names: + raise ValueError("no configs found in {}".format(os.path.dirname(__file__))) test_result = dict() sdkconfig_files = dict() - for config_name in CONFIG_NAME_PATTERN.findall(config_names_raw): + for config_name in config_names: # 1. get the config sdkconfig_files[config_name] = os.path.join(os.path.dirname(__file__), "sdkconfig.ci.{}".format(config_name))