diff options
author | Björn Gustavsson <[email protected]> | 2017-03-09 15:25:11 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-09 15:25:11 +0100 |
commit | a2a8721ba6770dade9b7cbc9b4d6bf953bb355fd (patch) | |
tree | bd1968ac9bf1e7e9f099633aebc4920e4b1a36f5 /scripts | |
parent | 97fc265ee9349a21c71df78da673456007ff4c92 (diff) | |
parent | b5a5591678140206d86177d0e2df8dbfad825184 (diff) | |
download | otp-a2a8721ba6770dade9b7cbc9b4d6bf953bb355fd.tar.gz otp-a2a8721ba6770dade9b7cbc9b4d6bf953bb355fd.tar.bz2 otp-a2a8721ba6770dade9b7cbc9b4d6bf953bb355fd.zip |
Merge pull request #1368 from bjorng/bjorn/travis/multiple-platforms
Extend Travis CI to test more configurations
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dockerfile.32 | 9 | ||||
-rw-r--r-- | scripts/Dockerfile.32.ubuntu | 5 | ||||
-rw-r--r-- | scripts/Dockerfile.64 | 9 | ||||
-rw-r--r-- | scripts/Dockerfile.64.ubuntu | 5 | ||||
-rwxr-xr-x | scripts/build-docker-otp | 15 | ||||
-rwxr-xr-x | scripts/build-otp | 6 | ||||
-rwxr-xr-x | scripts/run-smoke-tests | 23 |
7 files changed, 65 insertions, 7 deletions
diff --git a/scripts/Dockerfile.32 b/scripts/Dockerfile.32 new file mode 100644 index 0000000000..23a360a58e --- /dev/null +++ b/scripts/Dockerfile.32 @@ -0,0 +1,9 @@ +FROM erlang/ubuntu-build:32bit + +ADD ./otp.tar.gz /buildroot/ + +WORKDIR /buildroot/otp/ + +ENV MAKEFLAGS -j4 + +CMD ./scripts/build-otp diff --git a/scripts/Dockerfile.32.ubuntu b/scripts/Dockerfile.32.ubuntu new file mode 100644 index 0000000000..c334f74379 --- /dev/null +++ b/scripts/Dockerfile.32.ubuntu @@ -0,0 +1,5 @@ +FROM 32bit/ubuntu:16.04 + +RUN apt-get update + +RUN apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev fop xsltproc default-jdk git autoconf libwxbase3.0-dev libwxgtk3.0-dev diff --git a/scripts/Dockerfile.64 b/scripts/Dockerfile.64 new file mode 100644 index 0000000000..199067e5fe --- /dev/null +++ b/scripts/Dockerfile.64 @@ -0,0 +1,9 @@ +FROM erlang/ubuntu-build:64bit + +ADD ./otp.tar.gz /buildroot/ + +WORKDIR /buildroot/otp/ + +ENV MAKEFLAGS -j4 + +CMD ./scripts/build-otp diff --git a/scripts/Dockerfile.64.ubuntu b/scripts/Dockerfile.64.ubuntu new file mode 100644 index 0000000000..514fea70b5 --- /dev/null +++ b/scripts/Dockerfile.64.ubuntu @@ -0,0 +1,5 @@ +FROM ubuntu:16.04 + +RUN apt-get update + +RUN apt-get --fix-missing -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev fop xsltproc default-jdk git autoconf libwxbase3.0-dev libwxgtk3.0-dev diff --git a/scripts/build-docker-otp b/scripts/build-docker-otp new file mode 100755 index 0000000000..01bb0b628e --- /dev/null +++ b/scripts/build-docker-otp @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + echo "Usage $0 32|64 [command] [arg]..." + exit 1 +fi + +ARCH="$1" +shift + +git archive --format=tar.gz --prefix=otp/ HEAD >scripts/otp.tar.gz + +docker build -t otp --file scripts/Dockerfile.$ARCH scripts +rm scripts/otp.tar.gz +docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp ${1+"$@"} diff --git a/scripts/build-otp b/scripts/build-otp index da09fb8045..92031c79c8 100755 --- a/scripts/build-otp +++ b/scripts/build-otp @@ -14,7 +14,7 @@ function progress { } function do_and_log { - log="scripts/latest-log.$$" + log="logs/latest-log.$$" echo "" >$log echo -n "$1..." (progress $log) & @@ -32,6 +32,10 @@ function do_and_log { fi } +if [ ! -d "logs" ]; then + mkdir logs +fi + do_and_log "Autoconfing" autoconf do_and_log "Configuring" configure do_and_log "Building OTP" boot -a diff --git a/scripts/run-smoke-tests b/scripts/run-smoke-tests index c2333e7825..5a850c7107 100755 --- a/scripts/run-smoke-tests +++ b/scripts/run-smoke-tests @@ -1,10 +1,21 @@ #!/bin/bash set -ev -cd $ERL_TOP/release/tests/test_server -$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop - -if grep -q '=failed *[1-9]' ct_run.test_server@*/*/run.*/suite.log; then - echo "One or more tests failed." - exit 1 +if [ -z "$ERL_TOP" ]; then + ERL_TOP=$(pwd) fi + +function run_smoke_tests { + cd $ERL_TOP/release/tests/test_server + $ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop + + if grep -q '=failed *[1-9]' ct_run.test_server@*/*/run.*/suite.log; then + echo "One or more tests failed." + exit 1 + fi + rm -rf ct_run.test_server@* +} + +run_smoke_tests +ERL_FLAGS="-smp disable" run_smoke_tests + |