diff options
author | Sverker Eriksson <[email protected]> | 2017-08-30 21:00:35 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-08-30 21:00:35 +0200 |
commit | 44a83c8860bbd00878c720a7b9d940b4630bab8a (patch) | |
tree | 101b3c52ec505a94f56c8f70e078ecb8a2e8c6cd /scripts | |
parent | 7c67bbddb53c364086f66260701bc54a61c9659c (diff) | |
parent | 040bdce67f88d833bfb59adae130a4ffb4c180f0 (diff) | |
download | otp-44a83c8860bbd00878c720a7b9d940b4630bab8a.tar.gz otp-44a83c8860bbd00878c720a7b9d940b4630bab8a.tar.bz2 otp-44a83c8860bbd00878c720a7b9d940b4630bab8a.zip |
Merge tag 'OTP-20.0' into sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590
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 | 43 | ||||
-rwxr-xr-x | scripts/run-dialyzer | 7 | ||||
-rwxr-xr-x | scripts/run-smoke-tests | 21 |
8 files changed, 114 insertions, 0 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 new file mode 100755 index 0000000000..92a866a0a9 --- /dev/null +++ b/scripts/build-otp @@ -0,0 +1,43 @@ +#!/bin/bash + +function progress { + local file=$1 + ls=$(ls -l $file) + while [ true ]; do + sleep 10 + new_ls=$(ls -l $file) + if [ "$new_ls" != "$ls" ]; then + echo -n "." + fi + ls="$new_ls" + done +} + +function do_and_log { + log="logs/latest-log.$$" + echo "" >$log + echo -n "$1..." + (progress $log) & + pid=$! + disown + if ./otp_build $2 $3 >$log 2>&1; then + kill $pid >/dev/null 2>&1 + echo " done." + else + kill $pid >/dev/null 2>&1 + echo " failed." + tail -n 200 $log + echo "*** Failed ***" + exit 1 + fi +} + +if [ ! -d "logs" ]; then + mkdir logs +fi + +do_and_log "Autoconfing" autoconf +do_and_log "Configuring" configure --enable-plain-emulator +do_and_log "Building OTP" boot -a + +exit 0 diff --git a/scripts/run-dialyzer b/scripts/run-dialyzer new file mode 100755 index 0000000000..383ae2301d --- /dev/null +++ b/scripts/run-dialyzer @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +$ERL_TOP/bin/dialyzer --build_plt --apps asn1 compiler crypto dialyzer edoc erts et hipe inets kernel mnesia observer public_key runtime_tools snmp ssh ssl stdlib syntax_tools wx xmerl --statistics +$ERL_TOP/bin/dialyzer -n -Wunknown -Wunmatched_returns --apps compiler erts kernel stdlib asn1 crypto dialyzer hipe parsetools public_key runtime_tools sasl tools --statistics +$ERL_TOP/bin/dialyzer -n --apps common_test debugger edoc inets mnesia observer ssh ssl syntax_tools tools wx xmerl --statistics diff --git a/scripts/run-smoke-tests b/scripts/run-smoke-tests new file mode 100755 index 0000000000..5a850c7107 --- /dev/null +++ b/scripts/run-smoke-tests @@ -0,0 +1,21 @@ +#!/bin/bash +set -ev + +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 + |