#! /bin/sh # $Id$ # $URL$ # # Quick and Dirty test installation on a remote host # # testTestversion [host] runtests # # A python package is build and saved on a temporary location. # The resulting tarball: 'dist/test-$USER.tar.gz' is copied to a targethost:/tmp/ # where 'installTestversion' will install the package in the ~/server directory, # REMOVING any previous installations set -ex targethost=$1 case $targethost in '') echo "Usage: testTestversion targethost [runtests] (to OVERWRITE current bzv installation on that host)" exit 1 esac sed -e "s/version = .*/version = 'test-$USER',"/ setup2.py chmod 755 setup2.py newver=$(sed -rn "s/.*version = '([^']*)'.*/\1/p" setup2.py) ./setup2.py sdist mine=bzv-test-$USER file=$mine.tar.gz echo Installing on host: $targethost scp dist/$file $targethost:/tmp/ ssh $targethost "rm -rf ~/server /tmp/$mine; cd /tmp && tar xf $file && cd /tmp/$mine && mkdir /tmp/$mine/test/log && ./installTestversion " case $2 in runtests) ssh $targethost "cd /tmp/$mine/test && ln -s ../src bzv; LANG=en_US.UTF-8 ./alltests.py; LANG=en_US.UTF-8 ./integrationtest.py; LANG=en_US.UTF-8 ./oai_integrationtest.py" esac