Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSA: release.py updates to fixes situation where the script would get stuck #10038

Merged
merged 1 commit into from
Mar 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions tools/psa/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def build_mbed_spm_platform(target, toolchain, profile='release'):
:param profile: build profile.
"""
subprocess.check_call([
sys.executable, '-u', TEST_PY_LOCATTION,
sys.executable, TEST_PY_LOCATTION,
'--greentea',
'--profile', profile,
'-t', toolchain,
Expand All @@ -122,17 +122,17 @@ def build_mbed_spm_platform(target, toolchain, profile='release'):
'--build-data', os.path.join(ROOT, 'BUILD', 'tests',
target, 'build_data.json'),
'-n', MBED_PSA_TESTS
], stdout=subprocess.PIPE)
])

subprocess.check_call([
sys.executable, '-u', MAKE_PY_LOCATTION,
sys.executable, MAKE_PY_LOCATTION,
'-t', toolchain,
'-m', target,
'--profile', profile,
'--source', ROOT,
'--build', os.path.join(ROOT, 'BUILD', target),
'--artifact-name', 'psa_release_1.0'
], stdout=subprocess.PIPE)
])


def _tfm_test_defines(test):
Expand All @@ -155,7 +155,7 @@ def build_tfm_platform(target, toolchain, profile='release'):
"""
for test in TFM_TESTS.keys():
subprocess.check_call([
sys.executable, '-u', TEST_PY_LOCATTION,
sys.executable, TEST_PY_LOCATTION,
'--greentea',
'--profile', profile,
'-t', toolchain,
Expand All @@ -170,14 +170,14 @@ def build_tfm_platform(target, toolchain, profile='release'):
stdout=subprocess.PIPE)

subprocess.check_call([
sys.executable, '-u', MAKE_PY_LOCATTION,
sys.executable, MAKE_PY_LOCATTION,
'-t', toolchain,
'-m', target,
'--profile', profile,
'--source', ROOT,
'--build', os.path.join(ROOT, 'BUILD', target),
'--app-config', TFM_MBED_APP
], stdout=subprocess.PIPE)
])


def commit_binaries(target, delivery_dir):
Expand All @@ -191,24 +191,24 @@ def commit_binaries(target, delivery_dir):
changes_made = subprocess.call([
'git',
'-C', ROOT,
'diff', '--exit-code',
'diff', '--exit-code', '--quiet',
delivery_dir
], stdout=subprocess.PIPE)
])

if changes_made:
subprocess.check_call([
'git',
'-C', ROOT,
'add', os.path.relpath(delivery_dir, ROOT)
], stdout=subprocess.PIPE)
])

commit_message = '-m\"Update secure binaries for {}\"'.format(target)
subprocess.check_call([
'git',
'-C', ROOT,
'commit',
commit_message
], stdout=subprocess.PIPE)
])


def build_psa_platform(target, toolchain, delivery_dir, debug=False,
Expand Down