Memory Footprint: Export GCC v7.3.1 to ENV PATH
Exporting GCC PATH by directly run sh command in workspace
does not work in memory footprint.
It needs to be appended by Python scripts.
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I4322acaa786c3b23097a5c2ab193dc1726c105ba
diff --git a/jenkins/build-config.jpl b/jenkins/build-config.jpl
index 480f598..3a1618e 100644
--- a/jenkins/build-config.jpl
+++ b/jenkins/build-config.jpl
@@ -45,7 +45,7 @@
}
if (env.SQUAD_CONFIGURATIONS != ""){
//Creating a folder to store memory footprint artifacts and launching the memory footprint script.
- sh "mkdir tf-m-ci-scripts/Memory_footprint/ ; export PATH=${env.PATH}:${env.GCC_7_3_1_PATH}"
+ sh "mkdir tf-m-ci-scripts/Memory_footprint/"
withCredentials([string(credentialsId: 'QA_REPORTS_TOKEN', variable: 'TOKEN')]) {
sh(script: "python3 tf-m-ci-scripts/memory_footprint.py ${env.WORKSPACE}/trusted-firmware-m/ ${env.CONFIG_NAME} \'${env.SQUAD_CONFIGURATIONS}\' ${TOKEN}", returnStdout: true)
}
diff --git a/memory_footprint.py b/memory_footprint.py
index dfa5537..1447878 100644
--- a/memory_footprint.py
+++ b/memory_footprint.py
@@ -3,7 +3,7 @@
#memory_footprint.py : Script for sending memory footprint data from the TFM CI
#to a SQUAD web interface
#
-#Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+#Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
#SPDX-License-Identifier: BSD-3-Clause
@@ -179,6 +179,8 @@
return change_id
if __name__ == "__main__":
+ # Export GCC v7.3.1 to ENV PATH
+ os.environ["PATH"] += os.pathsep + os.getenv('GCC_7_3_1_PATH')
for i in range(len(REFERENCE_CONFIGS)):
REFERENCE_CONFIGS[i] = REFERENCE_CONFIGS[i].strip().lower()
config = identify_config()