| # Build the required docker image to run QEMU and Robot test cases |
| # parm1: <optional, the name of the docker image to generate> |
| # default is openbmc/ubuntu-robot-qemu |
| DOCKER_IMG_NAME=${1:-"openbmc/ubuntu-robot-qemu"} |
| # Determine our architecture, ppc64le or the other one |
| if [ $(uname -m) == "ppc64le" ]; then |
| ################################# docker img # ################################# |
| # Create docker image that can run QEMU and Robot Tests |
| FROM ${DOCKER_BASE}ubuntu:latest |
| ENV DEBIAN_FRONTEND noninteractive |
| RUN apt-get update && apt-get install -yy \ |
| robotframework-requests \ |
| robotframework-sshlibrary \ |
| robotframework-scplibrary |
| RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER} |
| RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} \ |
| ################################# docker img # ################################# |
| docker build -t ${DOCKER_IMG_NAME} - <<< "${Dockerfile}" |