summaryrefslogtreecommitdiff
path: root/build_default.py
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2023-03-17 10:40:45 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2023-03-17 11:22:53 +0000
commit1bd434e1d618b6222968202531e36a922c7c44f7 (patch)
tree267e14ad03d0f61a9cfb7055c12ceb56fa65f9cc /build_default.py
parent26bc923b15be6d1a1788f5afb26241b6fb89a718 (diff)
downloadml-embedded-evaluation-kit-1bd434e1d618b6222968202531e36a922c7c44f7.tar.gz
MLECO-3842, MLECO-3801, MLECO-3899: Minor improvements
Some minor improvements in this patch: * Added notes on troubleshooting WSL2 build issues. * Fixed a stray guard for MPS3_PLATFORM from noise reduction use-case. * The default build script `build_default.py` will now return an error code to the calling process if it fails. Change-Id: I4557a402646fdf903b2cb043bf68d5d0b0d12972 Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'build_default.py')
-rwxr-xr-xbuild_default.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/build_default.py b/build_default.py
index e35aa1c..1badb02 100755
--- a/build_default.py
+++ b/build_default.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
+# SPDX-FileCopyrightText: Copyright 2021-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -130,6 +130,11 @@ def run(
cmake_command, shell=True, stdout=logpipe, stderr=subprocess.STDOUT
)
+ if state.returncode != 0:
+ logging.error("Failed to configure the project.")
+ logpipe.close()
+ sys.exit(state.returncode)
+
make_command = f"{cmake_path} --build {build_dir} -j{make_jobs}"
if make_verbose:
make_command += "--verbose"
@@ -138,6 +143,11 @@ def run(
make_command, shell=True, stdout=logpipe, stderr=subprocess.STDOUT
)
+ if state.returncode != 0:
+ logging.error("Failed to build project.")
+ logpipe.close()
+ sys.exit(state.returncode)
+
logpipe.close()