##// END OF EJS Templates
run-tests: add support for marking tests as very slow...
run-tests: add support for marking tests as very slow I want to add tests for our packaging rules, but those necessarily run a whole build, or possibly two if both native packaging and docker are available. This lets us flag such tests with a `#require slow` so that they don't unnecessarily slow down normal test runs.

File last commit:

r26108:05306b93 default
r26109:bad09bd2 default
Show More
dockerdeb
40 lines | 1.2 KiB | text/plain | TextLexer
#!/bin/bash -eu
. $(dirname $0)/dockerlib.sh
. $(dirname $0)/packagelib.sh
BUILDDIR=$(dirname $0)
export ROOTDIR=$(cd $BUILDDIR/..; pwd)
checkdocker
DEBPLATFORM="$1"
PLATFORM="debian-$1"
shift # extra params are passed to build process
initcontainer $PLATFORM
DEBBUILDDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
OUTPUTDIR=$DEBBUILDDIR/staged contrib/builddeb --release $DEBPLATFORM --prepare
DSHARED=/mnt/shared/
if [ $(uname) = "Darwin" ] ; then
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
sh -c "cd /mnt/hg && make clean && make local"
fi
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
sh -c "cd /mnt/hg && make PREFIX=$DSHARED/staged/usr install"
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED $CONTAINER \
dpkg-deb --build $DSHARED/staged
if [ $(uname) = "Darwin" ] ; then
$DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
sh -c "cd /mnt/hg && make clean"
fi
gethgversion
rm -r $DEBBUILDDIR/staged
mv $DEBBUILDDIR/staged.deb $DEBBUILDDIR/mercurial-$version-$release.deb
echo
echo "Build complete - results can be found in $DEBBUILDDIR"