[Pdbg] [PATCH 2/2] utils: Add script to run make check

Joel Stanley joel at jms.id.au
Mon Aug 13 16:36:52 AEST 2018


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 at jms.id.au>
---
 .travis.yml   |  1 +
 utils/test.sh | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100755 utils/test.sh

diff --git a/.travis.yml b/.travis.yml
index 9e1a86bc3140..596b50ff4e1e 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 000000000000..e2bd25893910
--- /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
-- 
2.17.1



More information about the Pdbg mailing list