sim:tests: Move debug setting into test.sh

Use `--debug` to set the robot running the debug artifacts.

Change-Id: Ica2020c4ec2a364c0d87bf3e8497fabb4bb43347
diff --git a/shodan_boot.robot b/shodan_boot.robot
index a88f291..e294e8d 100644
--- a/shodan_boot.robot
+++ b/shodan_boot.robot
@@ -7,7 +7,7 @@
 
 *** Variables ***
 # This variable is set to be 0 by default, and should be override in CLI to test debug
-# sim/tests/test.sh --variable RUN_DEBUG:1 sim/tests/shodan_boot.robot
+# sim/tests/test.sh --debug sim/tests/shodan_boot.robot
 ${RUN_DEBUG}                     0
 
 ${LOG_TIMEOUT}                   2
diff --git a/test.sh b/test.sh
index 0f18e04..2ef1527 100755
--- a/test.sh
+++ b/test.sh
@@ -16,6 +16,17 @@
 
 ARGS=(
     -u "$(get_path "${RENODE_DIR}/tests/run_tests.py")"
+)
+
+if [[ $1 == "--debug" ]]; then
+  echo "Running debug artifacts"
+  shift
+  ARGS+=(
+    --variable "RUN_DEBUG:1"
+  )
+fi
+
+ARGS+=(
     --exclude "skip_${DETECTED_OS}"
     -r "$(get_path "${TESTS_RESULTS}")"
     --robot-framework-remote-server-full-directory "${RENODE_DIR}/bin"