diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-24 00:49:40 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-24 00:57:16 +0200 |
commit | 4213ec5ef9695aa504938c0e764ba9a4f08921b2 (patch) | |
tree | 88ac2b2eb01337f0924d687df38b2a163bc94e11 /tests | |
parent | 337a06f32fb530e0e0884fef2f5f630cca9911a1 (diff) | |
download | wydawca-4213ec5ef9695aa504938c0e764ba9a4f08921b2.tar.gz wydawca-4213ec5ef9695aa504938c0e764ba9a4f08921b2.tar.bz2 |
Initial implementation of daemon mode.
* gconf/gconf-gram.y (string_to_sockaddr_: Take struct gconf_sockaddr as the
first argument.
* gconf/gconf.h (struct gconf_sockaddr): New data type.
* src/job.c, src/net.c, src/pidfile.c: New files.
* src/Makefile.am (wydawca_SOURCES): Add job.c, net.c, pidfile.c
* src/cmdline.opt: New options: --cron (change semantics), --force,
--foreground, --single-process, --spool
* src/wydawca.c: New daemon mode.
* src/config.c: New statements: spool.alias, daemon, foreground,
single-process, wakeup-interval, pidfile, listen
* src/directive.c, src/diskio.c, src/gpg.c, src/mail.c, src/null.c,
src/process.c, src/triplet.c, src/verify.c, src/vtab.c, src/wydawca.h: use
static struct spool wherever feasible.
* src/triplet.c: New meta-variable "spool"
* tests/etc/wydawca.rcin: Update.
* tests/upload-dry.at: Update.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/etc/wydawca.rcin | 3 | ||||
-rw-r--r-- | tests/mailstats.at | 2 | ||||
-rw-r--r-- | tests/notify-upl.at | 2 | ||||
-rw-r--r-- | tests/upload-dry.at | 10 | ||||
-rw-r--r-- | tests/upload.at | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/tests/etc/wydawca.rcin b/tests/etc/wydawca.rcin index f897cf9..36ef7a2 100644 --- a/tests/etc/wydawca.rcin +++ b/tests/etc/wydawca.rcin | |||
@@ -76,7 +76,8 @@ access-method gpg-key { | |||
76 | "-----END PGP PUBLIC KEY BLOCK-----\n"); | 76 | "-----END PGP PUBLIC KEY BLOCK-----\n"); |
77 | } | 77 | } |
78 | 78 | ||
79 | spool ftp://wydawca.test { | 79 | spool test { |
80 | url ftp://wydawca.test; | ||
80 | source "@WD_SRC@"; | 81 | source "@WD_SRC@"; |
81 | destination "@WD_DST@"; | 82 | destination "@WD_DST@"; |
82 | archive none; | 83 | archive none; |
diff --git a/tests/mailstats.at b/tests/mailstats.at index b26c832..ff16f2a 100644 --- a/tests/mailstats.at +++ b/tests/mailstats.at | |||
@@ -19,7 +19,6 @@ AT_SETUP([Simple upload statistics]) | |||
19 | AT_DATA([errtmpl], | 19 | AT_DATA([errtmpl], |
20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started | 20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started |
21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite | 21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite |
22 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
23 | wydawca: [[INFO]] errors: 0 | 22 | wydawca: [[INFO]] errors: 0 |
24 | wydawca: [[INFO]] warnings: 0 | 23 | wydawca: [[INFO]] warnings: 0 |
25 | wydawca: [[INFO]] bad signatures: 0 | 24 | wydawca: [[INFO]] bad signatures: 0 |
@@ -33,6 +32,7 @@ wydawca: [[INFO]] files uploaded: 2 | |||
33 | wydawca: [[INFO]] files archived: 0 | 32 | wydawca: [[INFO]] files archived: 0 |
34 | wydawca: [[INFO]] symlinks created: 0 | 33 | wydawca: [[INFO]] symlinks created: 0 |
35 | wydawca: [[INFO]] symlinks removed: 0 | 34 | wydawca: [[INFO]] symlinks removed: 0 |
35 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
36 | ]) | 36 | ]) |
37 | 37 | ||
38 | AT_DATA([expout], | 38 | AT_DATA([expout], |
diff --git a/tests/notify-upl.at b/tests/notify-upl.at index ca57846..9efe1d9 100644 --- a/tests/notify-upl.at +++ b/tests/notify-upl.at | |||
@@ -19,7 +19,6 @@ AT_SETUP([Simple upload and notification]) | |||
19 | AT_DATA([errtmpl], | 19 | AT_DATA([errtmpl], |
20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started | 20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started |
21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite | 21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite |
22 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
23 | wydawca: [[INFO]] errors: 0 | 22 | wydawca: [[INFO]] errors: 0 |
24 | wydawca: [[INFO]] warnings: 0 | 23 | wydawca: [[INFO]] warnings: 0 |
25 | wydawca: [[INFO]] bad signatures: 0 | 24 | wydawca: [[INFO]] bad signatures: 0 |
@@ -33,6 +32,7 @@ wydawca: [[INFO]] files uploaded: 2 | |||
33 | wydawca: [[INFO]] files archived: 0 | 32 | wydawca: [[INFO]] files archived: 0 |
34 | wydawca: [[INFO]] symlinks created: 0 | 33 | wydawca: [[INFO]] symlinks created: 0 |
35 | wydawca: [[INFO]] symlinks removed: 0 | 34 | wydawca: [[INFO]] symlinks removed: 0 |
35 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
36 | ]) | 36 | ]) |
37 | 37 | ||
38 | AT_DATA([outtmpl], | 38 | AT_DATA([outtmpl], |
diff --git a/tests/upload-dry.at b/tests/upload-dry.at index 306f6f3..6ea1f2d 100644 --- a/tests/upload-dry.at +++ b/tests/upload-dry.at | |||
@@ -19,10 +19,10 @@ AT_SETUP([Dry-run upload]) | |||
19 | AT_DATA([template], | 19 | AT_DATA([template], |
20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started | 20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started |
21 | wydawca: [[DEBUG]] @WD_SRC@ -> @WD_DST@ | 21 | wydawca: [[DEBUG]] @WD_SRC@ -> @WD_DST@ |
22 | wydawca: [[DEBUG]] file file is a distributive, root file | 22 | wydawca: [[DEBUG]] found file file: distributive, stem: file |
23 | wydawca: [[DEBUG]] file file.directive.asc is a signed upload directive, root file | 23 | wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file |
24 | wydawca: [[DEBUG]] file file.sig is a detached signature, root file | 24 | wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file |
25 | wydawca: [[DEBUG]] processing files for ftp://wydawca.test (@WD_DST@) | 25 | wydawca: [[DEBUG]] processing spool test (@WD_DST@) |
26 | wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc | 26 | wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc |
27 | wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua> | 27 | wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua> |
28 | wydawca: [[DEBUG]] file: directive file signature OK | 28 | wydawca: [[DEBUG]] file: directive file signature OK |
@@ -32,7 +32,6 @@ wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite | |||
32 | wydawca: [[DEBUG]] good detached signature for file | 32 | wydawca: [[DEBUG]] good detached signature for file |
33 | wydawca: [[DEBUG]] installing file to @WD_DST@/proj | 33 | wydawca: [[DEBUG]] installing file to @WD_DST@/proj |
34 | wydawca: [[DEBUG]] installing file.sig to @WD_DST@/proj | 34 | wydawca: [[DEBUG]] installing file.sig to @WD_DST@/proj |
35 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
36 | wydawca: [[INFO]] errors: 0 | 35 | wydawca: [[INFO]] errors: 0 |
37 | wydawca: [[INFO]] warnings: 0 | 36 | wydawca: [[INFO]] warnings: 0 |
38 | wydawca: [[INFO]] bad signatures: 0 | 37 | wydawca: [[INFO]] bad signatures: 0 |
@@ -46,6 +45,7 @@ wydawca: [[INFO]] files uploaded: 2 | |||
46 | wydawca: [[INFO]] files archived: 0 | 45 | wydawca: [[INFO]] files archived: 0 |
47 | wydawca: [[INFO]] symlinks created: 0 | 46 | wydawca: [[INFO]] symlinks created: 0 |
48 | wydawca: [[INFO]] symlinks removed: 0 | 47 | wydawca: [[INFO]] symlinks removed: 0 |
48 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
49 | ]) | 49 | ]) |
50 | 50 | ||
51 | AT_CHECK([ | 51 | AT_CHECK([ |
diff --git a/tests/upload.at b/tests/upload.at index 1f3696c..1968658 100644 --- a/tests/upload.at +++ b/tests/upload.at | |||
@@ -19,7 +19,6 @@ AT_SETUP([Simple upload]) | |||
19 | AT_DATA([template], | 19 | AT_DATA([template], |
20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started | 20 | [wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) started |
21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite | 21 | wydawca: [[NOTICE]] file.directive.asc: COMMENT: Gnupload for Wydawca testsuite |
22 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
23 | wydawca: [[INFO]] errors: 0 | 22 | wydawca: [[INFO]] errors: 0 |
24 | wydawca: [[INFO]] warnings: 0 | 23 | wydawca: [[INFO]] warnings: 0 |
25 | wydawca: [[INFO]] bad signatures: 0 | 24 | wydawca: [[INFO]] bad signatures: 0 |
@@ -33,6 +32,7 @@ wydawca: [[INFO]] files uploaded: 2 | |||
33 | wydawca: [[INFO]] files archived: 0 | 32 | wydawca: [[INFO]] files archived: 0 |
34 | wydawca: [[INFO]] symlinks created: 0 | 33 | wydawca: [[INFO]] symlinks created: 0 |
35 | wydawca: [[INFO]] symlinks removed: 0 | 34 | wydawca: [[INFO]] symlinks removed: 0 |
35 | wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished | ||
36 | ]) | 36 | ]) |
37 | 37 | ||
38 | AT_CHECK([ | 38 | AT_CHECK([ |