aboutsummaryrefslogtreecommitdiff
path: root/tests/atlocal.in
blob: 18aa370bc165f30cd759fde1014a3bfff2d72f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# @configure_input@                                     -*- shell-script -*-
# Configurable variable values for Wydawca test suite.
# Copyright (C) 2009 Sergey Poznyakoff

PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH

XFAILFILE=$abs_builddir/.badversion

trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15

WD_CONFSRC=@abs_top_srcdir@/tests/etc
WD_DISTDIR=@abs_top_srcdir@/tests/dist
WD_SRC=@abs_top_builddir@/tests/source
WD_DST=@abs_top_builddir@/tests/dest

wydawca_init_testdirs() {
	for dir in "$WD_SRC" "$WD_DST"
	do
		if test -d "$dir"; then
			rm -rf "$dir"/*
		else
			mkdir "$dir"
	        fi
	done
}

wydawca_clean_testdirs() {
	rm -rf "$WD_SRC" "$WD_DST"
}

wydawca_expandmeta() {
	sed "s/@USER@/$USER/g;s,@WD_SRC@,$WD_SRC,g;s,@WD_DST@,$WD_DST,g;s,@WD_CONFSRC@,$WD_CONFSRC,g" $1 > $2
}

wydawca_config() {
	wydawca_expandmeta $WD_CONFSRC/${1}in $1
}

wydawca_upload() {
	for file in $@
	do
		cp "$WD_DISTDIR/$file" "$WD_SRC"
	done
}

wydawca_cmp() {
	p=$1
	shift
	for file in $@
	do
		cmp "$WD_DISTDIR/$file" "$WD_DST/$p/$file" || exit 1
	done
}

Return to:

Send suggestions and report system problems to the System administrator.