sapling/tests/library.sh
Augie Fackler 979732847b tests: skip tests if lz4 is missing
This prevents lots of useless test output if lz4 is missing on a machine.
2015-07-16 11:28:28 -04:00

44 lines
639 B
Bash

python -c 'import lz4' || exit 80
cp `echo $HGRCPATH` ./
CACHEDIR=$PWD/hgcache
cat >> .hgrc <<EOF
[remotefilelog]
cachepath=$CACHEDIR
debug=True
[extensions]
remotefilelog=$TESTDIR/../remotefilelog
rebase=
mq=
[ui]
ssh=python "$TESTDIR/dummyssh"
[server]
preferuncompressed=True
EOF
export HGRCPATH=$PWD/.hgrc
hgcloneshallow() {
local name
local dest
orig=$1
shift
dest=$1
shift
hg clone --shallow --config remotefilelog.reponame=master $orig $dest $@
cat >> $dest/.hg/hgrc <<EOF
[remotefilelog]
reponame=master
EOF
}
hginit() {
local name
name=$1
shift
hg init $name $@
}
clearcache() {
rm -rf $CACHEDIR/*
}