diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-01 17:27:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-01 17:27:31 +0200 |
commit | 017756f494ec95fc22bd3f43ef03e53834105674 (patch) | |
tree | d34b349c523129547825863ade98430b47bdc413 /test-upgrade | |
parent | b80502d210428de4471cc8a642dcd19aaa60ef26 (diff) |
0.4.0 release updates0.4.0
Diffstat (limited to 'test-upgrade')
-rwxr-xr-x | test-upgrade | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/test-upgrade b/test-upgrade deleted file mode 100755 index 29705da..0000000 --- a/test-upgrade +++ /dev/null @@ -1,93 +0,0 @@ -#! /usr/bin/env bash - -# Test build2 toolchain (and brep) upgrade. The old packages come from -# cppget.org/alpha and the new ones from cppget.org/queue. Run from build2/ -# root. -# -# Usage: test-upgrade [options] <old-toolchain> -# -# -c <option>|<module>|<var> -# Specify additional options, modules, or configuration variables to pass -# to the bpkg create command. For example: -# -usage="usage: $0 -t <old-toolchain>" - -owd=`pwd` -trap "{ cd $owd; exit 1; }" ERR -set -o errtrace # Trap in functions. - -function info () { echo "$*" 1>&2; } -function error () { info "$*"; exit 1; } - -cfg=/tmp/upgrade-cfg -ins=/tmp/upgrade-install -toolchain= -co=() # Use a bash array to handle arguments with spaces (say "-Ifoo -Ibar"). - -while [ $# -gt 0 ]; do - case $1 in - -c) - shift - co=("${co[@]}" "$1") - shift - ;; - *) - toolchain=${1%/} - shift - break - ;; - esac -done - -if [ -z "$toolchain" ]; then - error $usage -fi - -ob="$toolchain/bin/b" -if [ ! -x $ob ]; then - error "$ob does not exist or is not executable" -fi -obo="--build $ob" - -obpkg="$toolchain/bin/bpkg" -if [ ! -x $obpkg ]; then - error "$obpkg does not exist or is not executable" -fi - -# First create the configuration and build old packages using the old -# toolchain. -# -$obpkg $obo create -d $cfg --wipe "${co[@]}" -$obpkg add -d $cfg cppget.org/repository/1/alpha -$obpkg fetch -d $cfg -$obpkg $obo build -d $cfg --yes build2 bpkg brep - -# Now upgrade to new packages but still using the old toolchain. -# -$obpkg add -d $cfg cppget.org/repository/1/queue -$obpkg fetch -d $cfg -$obpkg $obo build -d $cfg --yes build2 bpkg brep - -# Install the new packages still using the old toolchain. -# -$obpkg $obo install -d $cfg config.install.root=$ins \ - config.bin.rpath=$ins/lib build2 bpkg brep - -$ins/bin/b --version 1>&2 -$ins/bin/bpkg --version 1>&2 -$ins/bin/brep-load --version 1>&2 - -# Check the use of the new toolchain on the old configuration. -# -nb="$ins/bin/b" -nbo="--build $nb" -nbpkg="$ins/bin/bpkg" - -$nbpkg $nbo clean -d $cfg build2 bpkg brep -$nbpkg $nbo build -d $cfg --yes build2 bpkg brep -$nbpkg $nbo install -d $cfg config.install.root=$ins \ - config.bin.rpath=$ins/lib build2 bpkg brep - -$ins/bin/b --version 1>&2 -$ins/bin/bpkg --version 1>&2 -$ins/bin/brep-load --version 1>&2 |