[Skiboot] [PATCH 3/3] travis: fix if x86_64 tests in dockerfiles.

Stewart Smith stewart at linux.ibm.com
Fri May 4 16:34:15 AEST 2018


In today's lesson, Stewart learns shell.

Fixes: e101e85c9ff65e82f7ede4d5541d921b4a3ed923
Reported-by: Joel Stanley <joel at jms.id.au>
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 opal-ci/Dockerfile-centos7         | 8 ++++----
 opal-ci/Dockerfile-debian-stretch  | 2 +-
 opal-ci/Dockerfile-debian-unstable | 4 ++--
 opal-ci/Dockerfile-fedora-rawhide  | 2 +-
 opal-ci/Dockerfile-fedora27        | 2 +-
 opal-ci/Dockerfile-ubuntu-12.04    | 4 ++--
 opal-ci/Dockerfile-ubuntu-16.04    | 4 ++--
 opal-ci/Dockerfile-ubuntu-18.04    | 6 +++---
 opal-ci/Dockerfile-ubuntu-latest   | 4 ++--
 9 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/opal-ci/Dockerfile-centos7 b/opal-ci/Dockerfile-centos7
index 06456b9a777e..3b041af89538 100644
--- a/opal-ci/Dockerfile-centos7
+++ b/opal-ci/Dockerfile-centos7
@@ -2,10 +2,10 @@ FROM centos:7
 RUN yum -y update && yum clean all
 RUN yum -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel openssl
 RUN mkdir /opt/cross
-RUN if [ `arch` == "x86_64" ]; then wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; fi
-RUN if [ `arch` == "ppc64le" ]; then wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/ppc64le/4.9.4/ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; tar -C /opt/cross -xf ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; fi
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8-1.0-2.el7.x86_64.rpm; yum install -y systemsim-p8-1.0-2.el7.x86_64.rpm; fi
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0.el7.x86_64.rpm; yum install -y systemsim-p9-1.0-0.el7.x86_64.rpm; fi
+RUN if [ `arch` = "x86_64" ]; then wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; fi
+RUN if [ `arch` = "ppc64le" ]; then wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/ppc64le/4.9.4/ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; tar -C /opt/cross -xf ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8-1.0-2.el7.x86_64.rpm; yum install -y systemsim-p8-1.0-2.el7.x86_64.rpm; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0.el7.x86_64.rpm; yum install -y systemsim-p9-1.0-0.el7.x86_64.rpm; fi
 RUN yum install -y flex bison
 RUN curl -L https://github.com/dgibson/dtc/archive/v1.4.2.tar.gz|tar xfz -
 RUN (cd dtc-1.4.2; make PREFIX=/usr/local install)
diff --git a/opal-ci/Dockerfile-debian-stretch b/opal-ci/Dockerfile-debian-stretch
index 96d3863035a3..9485e7a12b1a 100644
--- a/opal-ci/Dockerfile-debian-stretch
+++ b/opal-ci/Dockerfile-debian-stretch
@@ -4,7 +4,7 @@ RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget xterm curl device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-debian-unstable b/opal-ci/Dockerfile-debian-unstable
index bcec8c86a622..8a21008ce928 100644
--- a/opal-ci/Dockerfile-debian-unstable
+++ b/opal-ci/Dockerfile-debian-unstable
@@ -4,8 +4,8 @@ RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget xterm curl device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-fedora-rawhide b/opal-ci/Dockerfile-fedora-rawhide
index 4bfdd57a6a77..403110038048 100644
--- a/opal-ci/Dockerfile-fedora-rawhide
+++ b/opal-ci/Dockerfile-fedora-rawhide
@@ -1,7 +1,7 @@
 FROM fedora:rawhide
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 RUN dnf -y install gcc-powerpc64-linux-gnu 
-RUN if [ `arch` == "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
+RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-fedora27.sh
diff --git a/opal-ci/Dockerfile-fedora27 b/opal-ci/Dockerfile-fedora27
index 969c6d4e1eb8..4d9537b426c4 100644
--- a/opal-ci/Dockerfile-fedora27
+++ b/opal-ci/Dockerfile-fedora27
@@ -1,7 +1,7 @@
 FROM fedora:27
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 RUN dnf -y install gcc-powerpc64-linux-gnu 
-RUN if [ `arch` == "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
+RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-fedora27.sh
diff --git a/opal-ci/Dockerfile-ubuntu-12.04 b/opal-ci/Dockerfile-ubuntu-12.04
index 1e9b028d6172..e9f81206f9f8 100644
--- a/opal-ci/Dockerfile-ubuntu-12.04
+++ b/opal-ci/Dockerfile-ubuntu-12.04
@@ -11,8 +11,8 @@ RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
 RUN curl -L -O https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
 RUN sudo mkdir /opt/cross
 RUN sudo tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-12.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-16.04 b/opal-ci/Dockerfile-ubuntu-16.04
index 00831496d902..ce3148c3ec9a 100644
--- a/opal-ci/Dockerfile-ubuntu-16.04
+++ b/opal-ci/Dockerfile-ubuntu-16.04
@@ -4,8 +4,8 @@ RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-18.04 b/opal-ci/Dockerfile-ubuntu-18.04
index 910926ec777a..2ad3eda404b1 100644
--- a/opal-ci/Dockerfile-ubuntu-18.04
+++ b/opal-ci/Dockerfile-ubuntu-18.04
@@ -1,11 +1,11 @@
 FROM ubuntu:18.04
 ENV DEBIAN_FRONTEND    noninteractive
 RUN apt-get update -qq
-RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN if [ "`arch`" != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
+RUN if [ "`arch`" = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ "`arch`" = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest
index dfb62b7c891b..6adb170ae47b 100644
--- a/opal-ci/Dockerfile-ubuntu-latest
+++ b/opal-ci/Dockerfile-ubuntu-latest
@@ -4,8 +4,8 @@ RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
-RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
-- 
2.14.3



More information about the Skiboot mailing list