From fecec8587e4d61692d03354e4e095ddf31165c4e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 29 Oct 2024 21:19:39 +0000 Subject: [PATCH 1/3] Update test-nvidia-mlperf-implementation.yml --- .github/workflows/test-nvidia-mlperf-implementation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-nvidia-mlperf-implementation.yml b/.github/workflows/test-nvidia-mlperf-implementation.yml index f9fc94d7b..b1cfb11d0 100644 --- a/.github/workflows/test-nvidia-mlperf-implementation.yml +++ b/.github/workflows/test-nvidia-mlperf-implementation.yml @@ -2,7 +2,7 @@ name: MLPerf Inference Nvidia implementations on: schedule: - - cron: "23 20 * * *" #to be adjusted + - cron: "25 21 * * *" #to be adjusted jobs: build_nvidia: From 4b5b6c978c3fa0861273df19528d44a426564182 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 30 Oct 2024 10:24:46 +0000 Subject: [PATCH 2/3] Don't fail on dmidecode command in get-platform-details --- script/get-platform-details/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/get-platform-details/run.sh b/script/get-platform-details/run.sh index d3fc7e0d3..acac8e0b2 100644 --- a/script/get-platform-details/run.sh +++ b/script/get-platform-details/run.sh @@ -120,7 +120,7 @@ echo "------------------------------------------------------------" >> $OUTPUT_F echo "21. dmidecode" >> $OUTPUT_FILE if [[ ${CM_SUDO_USER} == "yes" ]]; then eval "${CM_SUDO} dmidecode" >> $OUTPUT_FILE - test $? -eq 0 || exit $? + test $? -eq 0 || echo "FAILED: dmidecode" >> $OUTPUT_FILE else echo "Requires SUDO permission" >> $OUTPUT_FILE fi @@ -129,7 +129,7 @@ echo "------------------------------------------------------------" >> $OUTPUT_F echo "22. BIOS" >> $OUTPUT_FILE if [[ ${CM_SUDO_USER} == "yes" ]]; then eval "${CM_SUDO} dmidecode -t bios" >> $OUTPUT_FILE - test $? -eq 0 || exit $? + test $? -eq 0 || echo "FAILED: dmidecode -t bios" >> $OUTPUT_FILE else echo "Requires SUDO permission" >> $OUTPUT_FILE fi From a5eff8e6f4e0f1d0c59f4118f3a7c62b3f5a6b30 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Wed, 30 Oct 2024 16:13:02 +0530 Subject: [PATCH 3/3] Added fail safe option for get-generic-sys-util --- script/get-generic-sys-util/run.sh | 23 ++++++++++++++++++----- script/get-platform-details/_cm.json | 5 ++++- script/get-platform-details/run.sh | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/script/get-generic-sys-util/run.sh b/script/get-generic-sys-util/run.sh index 27c2f6286..5074e756b 100644 --- a/script/get-generic-sys-util/run.sh +++ b/script/get-generic-sys-util/run.sh @@ -1,6 +1,19 @@ -#!/bin/bash +# Safe execution of a command stored in a variable +cmd="${CM_SYS_UTIL_INSTALL_CMD}" +echo "$cmd" -cmd=${CM_SYS_UTIL_INSTALL_CMD} -echo $cmd -eval $cmd -test $? -eq 0 || exit $? +# Execute the command and capture the exit status directly +if ! eval "$cmd"; then + echo "Command failed with status $?" + if [[ "${CM_TMP_FAIL_SAFE}" == 'yes' ]]; then + # Exit safely if fail-safe is enabled + echo "Fail-safe is enabled, exiting with status 0" + exit 0 + else + # Otherwise exit with the actual error status + exit $? + fi +else + #echo "Command succeeded" + exit 0 +fi diff --git a/script/get-platform-details/_cm.json b/script/get-platform-details/_cm.json index 11c57baa1..b02576ad9 100644 --- a/script/get-platform-details/_cm.json +++ b/script/get-platform-details/_cm.json @@ -66,7 +66,10 @@ "linux" ] }, - "tags": "get,sys-util,generic,_linux-tools" + "tags": "get,sys-util,generic,_linux-tools", + "env": { + "CM_TMP_FAIL_SAFE": "yes" + } } ], "tags": [ diff --git a/script/get-platform-details/run.sh b/script/get-platform-details/run.sh index acac8e0b2..ba2194e66 100644 --- a/script/get-platform-details/run.sh +++ b/script/get-platform-details/run.sh @@ -79,7 +79,7 @@ echo "------------------------------------------------------------" >> $OUTPUT_F echo "14. cpupower frequency-info" >> $OUTPUT_FILE eval "cpupower frequency-info" >> $OUTPUT_FILE -test $? -eq 0 || exit $? +test $? -eq 0 || echo "FAILED: cpupower frequency-info" >> $OUTPUT_FILE echo "------------------------------------------------------------" >> $OUTPUT_FILE echo "15. sysctl" >> $OUTPUT_FILE