Enable robot tests against QEMU

Change-Id: I38389b4ceb7ca8facf3c93345af0fa76c45a8b55
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/run-qemu-robot-test.sh b/run-qemu-robot-test.sh
index 0802e14..7475ece 100755
--- a/run-qemu-robot-test.sh
+++ b/run-qemu-robot-test.sh
@@ -58,7 +58,17 @@
 OBMC_BUILD_DIR=${OBMC_BUILD_DIR:-/tmp/openbmc/build}
 UPSTREAM_WORKSPACE=${UPSTREAM_WORKSPACE:-${1}}
 LAUNCH=${LAUNCH:-local}
-MACHINE=${MACHINE:-versatilepb}
+DEFAULT_MACHINE=versatilepb
+MACHINE=${MACHINE:-${DEFAULT_MACHINE}}
+
+# The automated test suite needs a real machine type so
+# if we're using versatilepb for our qemu start parameter
+# then we need to just let our run-robot use the default
+if [[ $MACHINE == $DEFAULT_MACHINE ]]; then
+    MACHINE_QEMU=
+else
+    MACHINE_QEMU=${MACHINE}
+fi
 
 # Determine the architecture
 ARCH=$(uname -m)
@@ -145,26 +155,27 @@
   # Now run the Robot test (Tests commented out until they are working again)
 
   # Timestamp for job
-  #echo "Robot Test started, $(date)"
+  echo "Robot Test started, $(date)"
 
-  #mkdir -p ${WORKSPACE}
-  #cd ${WORKSPACE}
+  mkdir -p ${WORKSPACE}
+  cd ${WORKSPACE}
 
   # Copy in the script which will execute the Robot tests
-  #cp $DIR/scripts/run-robot.sh ${WORKSPACE}
+  cp $DIR/scripts/run-robot.sh ${WORKSPACE}
 
   # Run the Docker container to execute the Robot test cases
   # The test results will be put in ${WORKSPACE}
-  #docker run --rm \
-  #           --user root \
-  #           --env HOME=${HOME} \
-  #           --env IP_ADDR=${DOCKER_QEMU_IP_ADDR} \
-  #           --env SSH_PORT=${DOCKER_SSH_PORT} \
-  #           --env HTTPS_PORT=${DOCKER_HTTPS_PORT} \
-  #           --workdir ${HOME} \
-  #           --volume ${WORKSPACE}:${HOME} \
-  #           --tty \
-  #           ${DOCKER_IMG_NAME} ${HOME}/run-robot.sh
+  docker run --rm \
+             --user root \
+             --env HOME=${HOME} \
+             --env IP_ADDR=${DOCKER_QEMU_IP_ADDR} \
+             --env SSH_PORT=${DOCKER_SSH_PORT} \
+             --env HTTPS_PORT=${DOCKER_HTTPS_PORT} \
+             --env MACHINE=${MACHINE_QEMU} \
+             --workdir ${HOME} \
+             --volume ${WORKSPACE}:${HOME} \
+             --tty \
+             ${DOCKER_IMG_NAME} ${HOME}/run-robot.sh
 
   # Now stop the QEMU Docker image
   docker stop $obmc_qemu_docker
diff --git a/scripts/run-robot.sh b/scripts/run-robot.sh
index 2bc5d4e..400b52d 100755
--- a/scripts/run-robot.sh
+++ b/scripts/run-robot.sh
@@ -12,12 +12,15 @@
 #   ROBOT_CODE_HOME  Location to extract the code
 #                    Default will be a temp location in /tmp/
 #   ROBOT_TEST_CMD   Command to execute from within obmc robot test framework
-#                    Default will be "tox -e qemu -- --include CI tests"
+#                    Default will be "tox -e qemu -- --include QEMU_CI tests"
+#   MACHINE          Type of system to run tests against
+#                    Default is qemu
 
 # we don't want to fail on bad rc since robot tests may fail
 
+MACHINE=${MACHINE:-"qemu"}
 ROBOT_CODE_HOME=${ROBOT_CODE_HOME:-/tmp/$(whoami)/${RANDOM}/obmc-robot/}
-ROBOT_TEST_CMD=${ROBOT_TEST_CMD:-"tox -e qemu -- --include CI tests"}
+ROBOT_TEST_CMD=${ROBOT_TEST_CMD:-"tox -e ${MACHINE} -- --argumentfile test_lists/QEMU_CI tests"}
 
 git clone https://github.com/openbmc/openbmc-test-automation.git \
         ${ROBOT_CODE_HOME}