aboutsummaryrefslogtreecommitdiff
path: root/tests/testsuite.at
blob: ced2ae99a37d028ff571a3f7dca93b7eab8b7be0 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# This file is part of Wydawca
# Copyright (C) 2009-2012, 2017, 2019-2022 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_UNPRIV_PREREQ],[test $(id -u) -eq 0 && AT_SKIP_TEST])
m4_define([AT_GPG_PREREQ],[test -n "$GPG" || 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_CHECK_UPLOAD([CONFIG],
m4_define([AT_CHECK_UPLOAD],
[AT_CHECK([AT_UNPRIV_PREREQ
AT_GPG_PREREQ
(wy_config_head
cat <<EOF
$1
EOF
) > wydawca.cf
wyinit wydawca.cf
$2
],
m4_shift2($@))])

# AT_WYDAWCA_DAEMON([PREREQ],[CONFIG],[INI],[SHELL-COMMANDS],[POST],[CODE],[STDOUT],[STDERR])
m4_define([AT_WYDAWCA_DAEMON],
[AT_CHECK([AT_UNPRIV_PREREQ
AT_GPG_PREREQ
$1
cat > helper.sh <<EOT
#!/bin/sh
. $WY_TESTDIR/atlocal
$4
EOT

(wy_config_head
cat <<EOF
$2
EOF
) > wydawca.cf
wyinit wydawca.cf

$3

wyasync -c $PWD/wydawca.cf -w --no-preproc -- /bin/sh ./helper.sh || exit $?

$5

cat wydawca.out | cwdrepl
cat wydawca.err | cwdrepl >&2
],m4_shiftn(5,$@))])

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

AT_INIT
AT_TESTED([wydawca])
m4_include([version.at])
m4_include([spoolsrc.at])

AT_BANNER([Backups])
m4_include([backup00.at])
m4_include([backup01.at])
m4_include([backup02.at])
m4_include([backup03.at])

AT_BANNER([Dry-run mode])
m4_include([dry_run00.at])
m4_include([dry_run01.at])
m4_include([dry_run02.at])

AT_BANNER([Verification])
m4_include([verify.at])

AT_BANNER([Uploads])
m4_include([upload00.at])
m4_include([upload01.at])
m4_include([upload02.at])
m4_include([upload03.at])
m4_include([upload04.at])
m4_include([upload05.at])

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

AT_BANNER([Plugins])
m4_include([mailnotify.at])
m4_include([mailstats.at])

AT_BANNER([Distribution verification])
m4_include([check-ok.at])
m4_include([check-fail.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([unp02.at])
m4_include([unp-idle.at])

Return to:

Send suggestions and report system problems to the System administrator.