aboutsummaryrefslogtreecommitdiff
path: root/tests/testsuite.at
blob: 511175f5bf14f1a2106a7c09727a806265d8a5b1 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# This file is part of Wydawca
# Copyright (C) 2009-2012, 2017, 2019-2020 Sergey Poznyakoff
#
# Wydawca is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Wydawca is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Wydawca.  If not, see <http://www.gnu.org/licenses/>.

m4_version_prereq([2.52g])

m4_define([AT_SKIP_TEST],[exit 77])
dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
m4_define([AT_SORT_PREREQ],[
test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST
])

m4_define([AT_MAILUTILS_PREREQ],[test "$WY_MAILUTILS" = yes || AT_SKIP_TEST])
m4_define([AT_INOTIFY_PREREQ],[test "$WY_INOTIFY" = yes || AT_SKIP_TEST])

# AT_WYDAWCA_DAEMON([PREREQ],[INI],[SHELL-COMMANDS],[POST],[CODE],[STDOUT],[STDERR])
m4_define([AT_WYDAWCA_DAEMON],
[AT_CHECK([$1
AT_DATA([helper.in],[$3
])
cat > helper.sh <<EOT
#!/bin/sh
. $WY_TESTDIR/atlocal
EOT
wydawca_expandmeta helper.in helper.bot
cat helper.bot >> helper.sh
wydawca_config wydawca.cf
$2
wyasync -c $PWD/wydawca.cf -w --no-preproc -- /bin/sh ./helper.sh || exit $?
$4
cat wydawca.out | cwdrepl
cat wydawca.err | cwdrepl >&2
],
[$5],
[$6],
[$7])])

m4_define([AT_WYDAWCA_INOTIFY_DAEMON],
[AT_WYDAWCA_DAEMON([AT_INOTIFY_PREREQ],$@)])

AT_INIT
AT_TESTED([wydawca])
m4_include([version.at])
m4_include([backup00.at])
m4_include([backup01.at])
m4_include([backup02.at])
m4_include([backup03.at])

AT_BANNER([Uploads])
m4_include([upload-dry.at])
m4_include([upload.at])
m4_include([upl11.at])
m4_include([upl12f.at])
m4_include([upl12t.at])

AT_BANNER([Symlinks])
m4_include([symlink00.at])
m4_include([symlink01.at])
m4_include([rmsymlink00.at])

AT_BANNER([Plugins])
m4_include([notify-upl.at])
m4_include([mailstats.at])

AT_BANNER([Distribution verification])
m4_include([check-fail.at])
m4_include([check-ok.at])
m4_include([check-notify.at])

AT_BANNER([inotify])
m4_include([inotify-ok.at])
m4_include([inotify-symlink.at])
m4_include([inotify-rmsymlink.at])
m4_include([inotify-unatt00.at])
m4_include([inotify-unatt01.at])

AT_BANNER([Legacy upload notification protocol])
m4_include([unp00.at])
m4_include([unp01.at])
m4_include([unp-idle.at])

Return to:

Send suggestions and report system problems to the System administrator.