Переглянути джерело

examples/wifi/iperf: fix test not finding any configs

Regression from ebd7004
Ivan Grokhotkov 6 роки тому
батько
коміт
211c54cef3
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      examples/wifi/iperf/iperf_test.py

+ 5 - 2
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))