summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-20 10:21:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-20 10:21:57 +0200
commitc7aed7b90e4f306afb1b09664de0c1e70b962f26 (patch)
treec3c1be6d4b0409b4ae693ee101933437e814dfbe /test
parentdb4f4539ac99eb18bad72a184964398919b25d6d (diff)
Add release scripts, doc
Diffstat (limited to 'test')
-rwxr-xr-xtest84
1 files changed, 84 insertions, 0 deletions
diff --git a/test b/test
new file mode 100755
index 0000000..1182a00
--- /dev/null
+++ b/test
@@ -0,0 +1,84 @@
+#! /usr/bin/env bash
+
+# Test build2 distribution.
+#
+# Usage: test
+#
+usage="usage: $0"
+
+owd=`pwd`
+trap "{ cd $owd; exit 1; }" ERR
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+# Calculate versions.
+#
+tcv=`cat build2-toolchain/version`
+v=`echo $tcv | sed -e 's/^\(.*\)\.\(.*\)\..*$/\1.\2/' -`
+
+if [ -z "$v" ]; then
+ error "unable to extract version from `cat build2-toolchain/version`"
+fi
+
+src=build2-$v
+
+
+# Update the development build.
+#
+info "making sure everythings is up to date..."
+b build2/ bpkg/
+
+
+# Test repository with the earliest and latest (development build via
+# /usr/local links) toolchains.
+#
+for t in etc1/install/0.1.0 /usr/local; do
+ cppget.org/test -t $t -n \
+-c cxx \
+-c config.cxx.coptions="-W -Wall -Wno-unknown-pragmas" \
+-c config.cxx.poptions="-I/usr/include/apache2 -I/usr/include/apr-1.0" \
+-c config.cxx.loptions=-L/usr/local/lib \
+cppget.org/repository/1/
+done
+
+
+# Test the build2-toolchain INSTALL procedure (plus brep) with the earliest
+# compiler versions we claim to support and the latest available.
+#
+# Note: Clang 3.4 and 3.7 are tested on FreeBSD below (3.4 cannot coexist
+# with newer versions on Ubuntu).
+#
+for c in g++-4.9 g++-5; do
+ etc/install \
+--cxx $c \
+--cppflags "-I/usr/include/apache2 -I/usr/include/apr-1.0" \
+$src/build2-toolchain-$tcv.tar.gz \
+http://pkg.cppget1/1/alpha
+done
+
+for c in clang-3.5 clang-3.6; do
+ etc/install \
+--cxx $c \
+--cppflags "-I/usr/include/apache2 -I/usr/include/apr-1.0" \
+--cxxflags --stdlib=libc++ \
+$src/build2-toolchain-$tcv.tar.gz \
+http://pkg.cppget1/1/alpha
+done
+
+# Test installation requiring sudo.
+#
+etc/install -t -i /opt/build2 -s $src/build2-toolchain-$tcv.tar.gz \
+http://pkg.cppget1/1/alpha
+
+
+# Test on FreeBSD with Clang 3.4 (default) and Clang 3.7.
+#
+scp etc/install $src/build2-toolchain-$tcv.tar.gz freebsd:/tmp/
+
+for c in clang++ clang++37; do
+ ssh freebsd cd /tmp ';' ./install \
+--cxx $c \
+--cppflags '"-I/usr/local/include/apr-1 -I/usr/local/include/apache24"' \
+build2-toolchain-$tcv.tar.gz http://pkg.cppget1/1/alpha
+done