From 49fd495689a90129fdc5f39debf2f06f031021ad Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Tue, 8 Dec 2020 11:55:49 +0800 Subject: [PATCH] check_examples_cmake_make: now it can run not only under idf path --- tools/ci/check_examples_cmake_make.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/ci/check_examples_cmake_make.py b/tools/ci/check_examples_cmake_make.py index 7a4f5e36af..12f3bd5a92 100644 --- a/tools/ci/check_examples_cmake_make.py +++ b/tools/ci/check_examples_cmake_make.py @@ -51,12 +51,15 @@ def get_idf_path(path, *paths): def _get_apps(target, build_system): print("- Getting paths of apps") - output = subprocess.check_output( - sys.executable + " " + os.getenv('IDF_PATH') + - "/tools/find_apps.py -p examples --recursive --target %s --build-system %s" - % (target, build_system), - shell=True).decode('utf-8') - o_list = output.split("\n") + args = [sys.executable, + get_idf_path('tools/find_apps.py'), + '-p', + get_idf_path('examples'), + '--recursive', + '--target', target, + '--build-system', build_system] + output = subprocess.check_output(args).decode('utf-8') + o_list = output.split('\n') json_list = [] for j in o_list: if j: