blob: 6e2459e0d42b67cd145d67930a4c77c658c83cc3 [file] [log] [blame]
Andrew Geissler0205e8d2016-08-10 07:46:19 -05001#!/bin/bash -x
2# Extract and run the OpenBMC robot test suite
3#
4# The robot test results will be copied to ${HOME}
5#
6# Requires following env variables be set:
7# IP_ADDR IP Address of openbmc
8# SSH_PORT SSH port of openbmc
9# HTTPS_PORT HTTPS port of openbmc
10#
11# Optional env variable
12# ROBOT_CODE_HOME Location to extract the code
13# Default will be a temp location in /tmp/
Andrew Geissler88906412016-09-02 10:30:47 -050014# ROBOT_TEST_CMD Command to execute from within obmc robot test framework
15# Default will be "tox -e qemu -- --include CI tests"
Andrew Geissler0205e8d2016-08-10 07:46:19 -050016
17# we don't want to fail on bad rc since robot tests may fail
18
19ROBOT_CODE_HOME=${ROBOT_CODE_HOME:-/tmp/$(whoami)/${RANDOM}/obmc-robot/}
Andrew Geissler88906412016-09-02 10:30:47 -050020ROBOT_TEST_CMD=${ROBOT_TEST_CMD:-"tox -e qemu -- --include CI tests"}
Andrew Geissler0205e8d2016-08-10 07:46:19 -050021
22git clone https://github.com/openbmc/openbmc-test-automation.git \
23 ${ROBOT_CODE_HOME}
24
25cd ${ROBOT_CODE_HOME}
26
27chmod ugo+rw -R ${ROBOT_CODE_HOME}/*
28
29# Execute the CI tests
30export OPENBMC_HOST=${IP_ADDR}
31export SSH_PORT=${SSH_PORT}
32export HTTPS_PORT=${HTTPS_PORT}
33
Andrew Geissler88906412016-09-02 10:30:47 -050034"$($ROBOT_TEST_CMD)"
Andrew Geissler0205e8d2016-08-10 07:46:19 -050035
36cp ${ROBOT_CODE_HOME}/*.xml ${HOME}/
37cp ${ROBOT_CODE_HOME}/*.html ${HOME}/
38
39#rm -rf ${ROBOT_CODE_HOME}