test: get bin path from dut.app.flash_files instead of dut.download_config

This commit is contained in:
He Yin Ling 2019-01-03 09:57:47 +08:00
parent 1c54630eaa
commit 86cc434ff1
2 changed files with 6 additions and 6 deletions

View File

@ -29,9 +29,9 @@ def test_examples_parttool(env, extra_data):
script_path = os.path.join(os.getenv("IDF_PATH"), "examples", "storage", "parttool", "parttool_example.py")
binary_path = ""
for config in dut.download_config:
if "parttool.bin" in config:
binary_path = config
for flash_file in dut.app.flash_files:
if "parttool.bin" in flash_file[1]:
binary_path = flash_file[1]
break
subprocess.check_call([sys.executable, script_path, "--binary", binary_path])

View File

@ -32,9 +32,9 @@ def test_otatool_example(env, extra_data):
script_path = os.path.join(os.getenv("IDF_PATH"), "examples", "system", "ota", "otatool", "otatool_example.py")
binary_path = ""
for config in dut.download_config:
if "otatool.bin" in config:
binary_path = config
for flash_file in dut.app.flash_files:
if "otatool.bin" in flash_file[1]:
binary_path = flash_file[1]
break
subprocess.check_call([sys.executable, script_path, "--binary", binary_path])