From b4c93b0351f5d3f4c391b763a43043f7a16027e7 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 10 Dec 2024 02:00:09 +0530 Subject: [PATCH] Fix exit condition check for mlperf-loadgen-build --- script/get-mlperf-inference-loadgen/run.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/script/get-mlperf-inference-loadgen/run.sh b/script/get-mlperf-inference-loadgen/run.sh index ac61ad329b..47885f1508 100644 --- a/script/get-mlperf-inference-loadgen/run.sh +++ b/script/get-mlperf-inference-loadgen/run.sh @@ -25,14 +25,14 @@ cmake \ -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ "${CM_MLPERF_INFERENCE_SOURCE}/loadgen" \ -DPYTHON_EXECUTABLE:FILEPATH="${CM_PYTHON_BIN_WITH_PATH}" -B . -if [ ${?} -ne 0 ]; then exit $?; fi +test $? -eq 0 || exit $? echo "******************************************************" CM_MAKE_CORES=${CM_MAKE_CORES:-${CM_HOST_CPU_TOTAL_CORES}} CM_MAKE_CORES=${CM_MAKE_CORES:-2} cmake --build . --target install -j "${CM_MAKE_CORES}" -if [ ${?} -ne 0 ]; then exit $?; fi +test $? -eq 0 || exit $? # Clean build directory (too large) cd "${CUR_DIR}" @@ -43,8 +43,7 @@ fi cd "${CM_MLPERF_INFERENCE_SOURCE}/loadgen" ${CM_PYTHON_BIN_WITH_PATH} -m pip install . --target="${MLPERF_INFERENCE_PYTHON_SITE_BASE}" - -if [ ${?} -ne 0 ]; then exit $?; fi +test $? -eq 0 || exit $? # Clean the built wheel #find . -name 'mlcommons_loadgen*.whl' | xargs rm