sim:tests: Update test arguments for different renode builds Antmicro's nightly release doesn't use mono as its runner, where as the build from the source uses mono. Need to make the robot works in both scenarios. Change-Id: I03f0546f4737e1745e6311a9b6699c0b71a94914
diff --git a/test.sh b/test.sh index 1fa7679..a5998a6 100755 --- a/test.sh +++ b/test.sh
@@ -13,13 +13,32 @@ source "${RENODE_DIR}/tests/common.sh" STTY_CONFIG=$(stty -g 2>/dev/null) -${PYTHON_RUNNER} -u "$(get_path "${RENODE_DIR}/tests/run_tests.py")" \ - --exclude "skip_${DETECTED_OS}" \ - -r "$(get_path "${TESTS_RESULTS}")" \ - "$@" \ - --robot-framework-remote-server-full-directory "${RENODE_DIR}/bin" \ - --css-file "${RENODE_DIR}/tests/robot.css" \ + +ARGS=( + -u "$(get_path "${RENODE_DIR}/tests/run_tests.py")" + --exclude "skip_${DETECTED_OS}" + -r "$(get_path "${TESTS_RESULTS}")" + --robot-framework-remote-server-full-directory "${RENODE_DIR}/bin" + --css-file "${RENODE_DIR}/tests/robot.css" --show-log + "$@" +) +RUNNER="mono" +if [[ -f "${RENODE_DIR}/tag" ]]; then + if grep -q "renode-" "${RENODE_DIR}/tag"; then + RUNNER="none" + ARGS+=( + --robot-framework-remote-server-full-directory "${RENODE_DIR}" + --robot-framework-remote-server-name renode + --runner none + ) + fi +fi + +echo "Renode uses runner ${RUNNER}" + +${PYTHON_RUNNER} "${ARGS[@]}" + RESULT_CODE=$? if [[ -n "${STTY_CONFIG:-}" ]]; then