From 5fa935e5ea13929a390eea8a759d65a03d5f8960 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 11 Nov 2020 11:37:57 +0800 Subject: [PATCH] CI: fix the bug returns wrong artifact path when app_name is a subset of a longer one --- tools/ci/python_packages/ttfw_idf/IDFApp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ci/python_packages/ttfw_idf/IDFApp.py b/tools/ci/python_packages/ttfw_idf/IDFApp.py index dfa767ea22..22eaf5b52c 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFApp.py +++ b/tools/ci/python_packages/ttfw_idf/IDFApp.py @@ -80,7 +80,9 @@ class Artifacts(object): for artifact_info in artifact_index: match_result = True if app_path: - match_result = app_path in artifact_info["app_dir"] + # We use endswith here to avoid issue like: + # examples_protocols_mqtt_ws but return a examples_protocols_mqtt_wss failure + match_result = artifact_info["app_dir"].endswith(app_path) if config_name: match_result = match_result and config_name == artifact_info["config"] if target: