Source

aurum / test / gentests-setuptestrepos.zsh

#!/bin/zsh
emulate -L zsh

typeset -r LOGFILE=$PWD/gentests-setuptestrepos.log

function silent()
{
    echo "{{{1 Running "${(q)@} > $LOGFILE
    $@ >$LOGFILE
}

tar xJf hgtestrepo.tar.xz
tar xJf hgtestbranchedrepo.tar.xz

tar xJf gittestrepo.tar.xz
tar xJf gitteststatusrepo.tar.xz
tar xJf gittestbranchedrepo.tar.xz
mkdir drivers-git-A && (cd drivers-git-A && tar xJf ../drivers-git-first-two.tar.xz)

tar xJf svntestreposerver.tar.xz
mkdir svntestrepo-subdirserver
tar c -C svntestreposerver . | ( cd svntestrepo-subdirserver && tar x )
silent svn checkout file://$PWD/svntestreposerver svntestrepo
silent svn checkout file://$PWD/svntestrepo-subdirserver/subdir svntest-subdirrepo

for test in cmd-annotate-buffers cmd+maps-commit cmd-record cmd-status \
            maps-status cmd-vimdiff cmd-diff cmd-update opts-remembermsg \
            opts-usewin cmd-vimdiff-full cmdaus
do
    mkdir ${test}repo
    tar c -C hgtestrepo . | (cd ${test}repo && tar x)
done

silent hg clone hgtestbranchedrepo cmd-other-A -r A -r B
silent hg clone cmd-other-A        cmd-other-B
silent hg pull -R cmd-other-B hgtestbranchedrepo -r C -r D
silent hg clone cmd-other-B        cmd-other-C
silent hg clone hgtestrepo cmd-otherrepo -r 1

for test in *.in ; do
    [[ $test == drivers-* ]] && continue
    test=$test:r
    [[ -d ${test}repo ]] && continue
    silent hg clone hgtestrepo ${test}repo
done
# vim: fmr=▶,▲ ts=4 sts=4 sw=4 et