summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-08-13 16:06:52 +0930
committerAlistair Popple <alistair@popple.id.au>2018-09-07 12:59:00 +1000
commitb65867d84267a0f85d127507d1be512361ef04ae (patch)
tree081e87a5874e328287ae6f8d1297fd849f47d030
parent84ad115cddf4936285877b7b4d5cb40bd8c5d27b (diff)
downloadpdbg-b65867d84267a0f85d127507d1be512361ef04ae.tar.gz
pdbg-b65867d84267a0f85d127507d1be512361ef04ae.zip
utils: Add script to run make check
This builds the software for the host architecture and runs make check inside a container. Added to the travis configuration. Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--.travis.yml1
-rwxr-xr-xutils/test.sh33
2 files changed, 34 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 9e1a86b..596b50f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,3 +3,4 @@ services:
script:
- ./utils/build.sh
+ - ./utils/test.sh
diff --git a/utils/test.sh b/utils/test.sh
new file mode 100755
index 0000000..e2bd258
--- /dev/null
+++ b/utils/test.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -e
+
+CONTAINER=pdbg-check
+
+Dockerfile=$(cat << EOF
+FROM ubuntu:18.04
+RUN apt-get update && apt-get install --no-install-recommends -yy \
+ make \
+ gcc \
+ autoconf \
+ automake \
+ libtool \
+ git \
+ device-tree-compiler
+RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
+USER ${USER}
+ENV HOME ${HOME}
+RUN /bin/bash
+EOF
+)
+
+docker pull ubuntu:18.04
+docker build -t ${CONTAINER} - <<< "${Dockerfile}"
+
+RUN="docker run --rm=true --user=${USER} -w ${PWD} -v ${HOME}:${HOME} -t ${CONTAINER}"
+
+${RUN} ./bootstrap.sh
+${RUN} ./configure
+${RUN} make clean
+${RUN} make
+${RUN} make check
OpenPOWER on IntegriCloud