Skip to content

Commit

Permalink
stateful shell
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed May 27, 2022
1 parent 2443fb3 commit 29700a5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import optparse
import os
import shutil
import subprocess
import sys
import tarfile
import textwrap
Expand Down Expand Up @@ -349,13 +348,10 @@ def main(argv: Sequence[str]) -> None:
#

if options.ci:
# if options.build_target == "nrfconnect":
# os.environ['GNUARMEMB_TOOLCHAIN_PATH'] = os.environ['PW_ARM_CIPD_INSTALL_DIR']
for device_name in [d for d in _DEVICE_LIST if d in _CI_ALLOW_LIST]:
shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"")
shell.run_cmd("./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}")
# command = f"./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}"
# subprocess.check_call(command, cwd=_CHEF_SCRIPT_PATH, shell=True)
if options.build_target == "nrfconnect":
shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"")
shell.run_cmd(f"./{_REPO_BASE_PATH}/examples/chef/chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}")
exit(0)

#
Expand All @@ -378,11 +374,11 @@ def main(argv: Sequence[str]) -> None:
directory = platform_meta['build_dir']
label = platform_meta['platform_label']
output_dir = os.path.join(_CHEF_SCRIPT_PATH, directory)
command = f"./chef.py -cbr --use_zzz -d {device_name} -t {platform}"
flush_print("-" * 64)
flush_print(f"Building {command}")
flush_print("-" * 64)
subprocess.check_call(command, cwd=_CHEF_SCRIPT_PATH, shell=True)
shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"")
shell.run_cmd(f"./{_REPO_BASE_PATH}/examples/chef/chef.py -cbr --use_zzz -d {device_name} -t {platform}")
archive_name = f"{label}-chef-{device_name}-wifi-rpc"
archive_full_name = archive_prefix + archive_name + archive_suffix
flush_print(f"Adding build output to archive {archive_full_name}")
Expand Down

0 comments on commit 29700a5

Please sign in to comment.