summaryrefslogtreecommitdiffstats
path: root/test/lib/common.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-08 15:03:27 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-08 15:03:27 +0200
commit9eb1cd7b9403533c4b60ecfbbbf00a08c211059a (patch)
tree024459abc4017b4c574bf6e5cd9d2f4df2b95f26 /test/lib/common.inc
parent388d629327d97e8d15a7a67cc87ae36edfe2f385 (diff)
downloaddbscripts-9eb1cd7b9403533c4b60ecfbbbf00a08c211059a.tar.gz
dbscripts-9eb1cd7b9403533c4b60ecfbbbf00a08c211059a.tar.xz
Move common function to db-functions
db-functions now sets an individual $WORKDIR and implements trap functinos that remove locks on exit or error. There are new functions to lock and unlock the running script. misc-scripts/ftpdir-cleanup was renamed to ftpdir-cleanup-repo as the cron-job had the same name. Script names have to be unique when using db-functions.
Diffstat (limited to 'test/lib/common.inc')
-rw-r--r--test/lib/common.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/common.inc b/test/lib/common.inc
index d28017d..ba5be9f 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -7,8 +7,8 @@ oneTimeSetUp() {
echo -n 'Building packages...'
for p in "${pkgdir}"/*; do
pushd $p >/dev/null
- linux32 makepkg -cf --config ${curdir}/lib/makepkg-i686.conf >/dev/null 2>&1 || exit 1
- [ -f *-any.pkg.tar.* ] || linux64 makepkg -cf --config ${curdir}/lib/makepkg-x86_64.conf >/dev/null 2>&1 || exit 1
+ linux32 makepkg -cf --config ${curdir}/lib/makepkg-i686.conf >/dev/null 2>&1 || die 'makepkg failed'
+ [ -f *-any.pkg.tar.* ] || linux64 makepkg -cf --config ${curdir}/lib/makepkg-x86_64.conf >/dev/null 2>&1 || die 'makepkg failed'
popd >/dev/null
done
echo 'done'
@@ -23,7 +23,7 @@ setUp() {
local p
local pkg
- [ -f "${curdir}/../config.local" ] && exit 1
+ [ -f "${curdir}/../config.local" ] && die "${curdir}/../config.local exists"
TMP="$(mktemp -d /dev/shm/$(basename $0).XXXXXXXXXX)"
#echo "Using ${TMP}"