mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/idf_tools_noninteractive' into 'master'
tools, ci: Use non-interactive mode for idf_tools in CI See merge request idf/esp-idf!5129
This commit is contained in:
commit
1de7b8d5d3
@ -74,8 +74,7 @@ variables:
|
||||
rm -rf "$CUSTOM_TOOLCHAIN_PATH"
|
||||
|
||||
.setup_tools: &setup_tools |
|
||||
tools/idf_tools.py install &&
|
||||
eval "$(tools/idf_tools.py export)"
|
||||
tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1
|
||||
|
||||
before_script:
|
||||
- source tools/ci/setup_python.sh
|
||||
|
@ -128,6 +128,7 @@ EXPORT_KEY_VALUE = 'key-value'
|
||||
|
||||
|
||||
global_quiet = False
|
||||
global_non_interactive = False
|
||||
global_idf_path = None
|
||||
global_idf_tools_path = None
|
||||
global_tools_json = None
|
||||
@ -521,7 +522,7 @@ class IDFTool(object):
|
||||
for retry in range(DOWNLOAD_RETRY_COUNT):
|
||||
local_temp_path = local_path + '.tmp'
|
||||
info('Downloading {} to {}'.format(archive_name, local_temp_path))
|
||||
urlretrieve(url, local_temp_path, report_progress)
|
||||
urlretrieve(url, local_temp_path, report_progress if not global_non_interactive else None)
|
||||
sys.stdout.write("\rDone\n")
|
||||
sys.stdout.flush()
|
||||
if not self.check_download_file(download_obj, local_temp_path):
|
||||
@ -1150,6 +1151,7 @@ def main(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('--quiet', help='Don\'t output diagnostic messages to stdout/stderr', action='store_true')
|
||||
parser.add_argument('--non-interactive', help='Don\'t output interactive messages and questions', action='store_true')
|
||||
parser.add_argument('--tools-json', help='Path to the tools.json file to use')
|
||||
parser.add_argument('--idf-path', help='ESP-IDF path to use')
|
||||
|
||||
@ -1204,6 +1206,10 @@ def main(argv):
|
||||
global global_quiet
|
||||
global_quiet = True
|
||||
|
||||
if args.non_interactive:
|
||||
global global_non_interactive
|
||||
global_non_interactive = True
|
||||
|
||||
global global_idf_path
|
||||
global_idf_path = os.environ.get('IDF_PATH')
|
||||
if args.idf_path:
|
||||
|
Loading…
x
Reference in New Issue
Block a user