summaryrefslogtreecommitdiffabout
path: root/tests/etc
authorSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 16:50:14 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-01-02 16:50:14 (GMT)
commit1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7 (patch) (side-by-side diff)
tree061ee328e2464d5bed9f5882642fbc25d32de8bc /tests/etc
parenta510f517e1aff073e6b37a5fa9e8ed825de836af (diff)
downloadwydawca-1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7.tar.gz
wydawca-1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7.tar.bz2
Add testcases for distribution tarball checking.
* src/directive.c (run_check_script): Reword diagnostic messages. * tests/check-fail.at: New testcase. * tests/check-notify.at: New testcase. * tests/check-ok.at: New testcase. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new tests. * tests/atlocal.in (wydawca_init_testdirs): Create three source subdirectories. (wydawca_upload): Treat first argument as the name of a source subdirectory. * tests/etc/notify.rc: Add check-failure notification. * tests/etc/wydawca.rcin (ckfail, ckok): New spools. * tests/mailstats.at, tests/notify-upl.at, tests/upload.at: Update. * tests/upload-dry.at: Update output template.
Diffstat (limited to 'tests/etc') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/etc/notify.rc20
-rw-r--r--tests/etc/wydawca.rcin27
2 files changed, 45 insertions, 2 deletions
diff --git a/tests/etc/notify.rc b/tests/etc/notify.rc
index 528d8f5..4461ce3 100644
--- a/tests/etc/notify.rc
+++ b/tests/etc/notify.rc
@@ -174,3 +174,23 @@ Wydawca
The Project Submission Robot
EOT;
}
+
+notify-event {
+ event check-failure;
+ recipient user;
+ message <<EOT
+Subject: ${triplet:dist} rejected
+
+Your upload of ${triplet:dist} has been rejected by the distribution
+verification procedure with the following diagnostics:
+
+${check:diagn}
+Please fix the tarball and resubmit.
+
+Regards,
+Wydawca
+The Project Submission Robot
+EOT;
+}
+
+
diff --git a/tests/etc/wydawca.rcin b/tests/etc/wydawca.rcin
index d012554..7e9f4ad 100644
--- a/tests/etc/wydawca.rcin
+++ b/tests/etc/wydawca.rcin
@@ -26,7 +26,6 @@ dictionary project-owner {
params ("/exact",
"proj", "proj-owner@localhost", "Project Admin");
}
-
dictionary project-uploader {
type builtin;
query "${project}";
@@ -66,9 +65,33 @@ dictionary project-uploader {
spool test {
url ftp://wydawca.test;
- source "@WD_SRC@";
+ source "@WD_SRC@/test";
+ destination "@WD_DST@";
+ archive none;
+}
+
+spool ckfail {
+ url ftp://wydawca.ckfail;
+ source "@WD_SRC@/fail";
+ destination "@WD_DST@";
+ archive none;
+ check-script <<EOT
+echo WYDAWCA_SPOOL=$WYDAWCA_SPOOL
+echo WYDAWCA_SOURCE=$WYDAWCA_SOURCE
+echo WYDAWCA_DEST=$WYDAWCA_DEST
+echo WYDAWCA_URL=$WYDAWCA_URL
+echo WYDAWCA_TRIPLET_BASE=$WYDAWCA_TRIPLET_BASE
+echo WYDAWCA_DIST_FILE=$WYDAWCA_DIST_FILE
+exit 1
+EOT;
+}
+
+spool ckok {
+ url ftp://wydawca.ckok;
+ source "@WD_SRC@/ok";
destination "@WD_DST@";
archive none;
+ check-script "exit 0";
}
admin-address "root@localhost";

Return to:

Send suggestions and report system problems to the System administrator.