From 4132ee3a050690bc5441b696ced4a5a4f8e891cf Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 26 Aug 2019 13:32:20 -0700 Subject: [PATCH] ci: do not export BSIM env vars if bsim is not available When running run_ci.sh locally with: ./scripts/ci/run_ci.sh -l -b master -R upstream/master.. we export BSIM_OUT_PATH unconditionally which causes sanitycheck to fail on nrf52_bsim (it depends on BSIM_OUT_PATH variable). Check if the path defined in BSIM_OUT_PATH is available and unset env. variable if it is not. Signed-off-by: Anas Nashif --- scripts/ci/run_ci.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ci/run_ci.sh b/scripts/ci/run_ci.sh index 539cf14b209..1b393f5c96a 100755 --- a/scripts/ci/run_ci.sh +++ b/scripts/ci/run_ci.sh @@ -24,6 +24,9 @@ SANITYCHECK_OPTIONS=" --inline-logs -N" SANITYCHECK_OPTIONS_RETRY="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-2nd-pass" SANITYCHECK_OPTIONS_RETRY_2="${SANITYCHECK_OPTIONS} --only-failed --outdir=out-3nd-pass" export BSIM_OUT_PATH="${BSIM_OUT_PATH:-/opt/bsim/}" +if [ ! -d "${BSIM_OUT_PATH}" ]; then + unset BSIM_OUT_PATH +fi export BSIM_COMPONENTS_PATH="${BSIM_OUT_PATH}/components/" BSIM_BT_TEST_RESULTS_FILE="./bsim_bt_out/bsim_results.xml" WEST_COMMANDS_RESULTS_FILE="./pytest_out/west_commands.xml"