aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-05-27 19:10:36 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-05-27 19:10:36 +0300
commit9ba482929aff9a95afd29ad14328dc0cd58d78c4 (patch)
treec402609770f680b4b16ae879a63b87fbc686ba6c /tests
parent83d7377354504cf3d92a5bdf9cade07554c6b66e (diff)
downloadwydawca-9ba482929aff9a95afd29ad14328dc0cd58d78c4.tar.gz
wydawca-9ba482929aff9a95afd29ad14328dc0cd58d78c4.tar.bz2
Bugfix in testsuite.
* tests/testsuite.at (AT_SORT_PREREQ): New macro. * tests/upload-dry.at: Avoid dependency on the sort order.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at4
-rw-r--r--tests/upload-dry.at17
2 files changed, 14 insertions, 7 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 3821985..d0195e3 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -15,12 +15,16 @@
15# You should have received a copy of the GNU General Public License 15# You should have received a copy of the GNU General Public License
16# along with Wydawca. If not, see <http://www.gnu.org/licenses/>. 16# along with Wydawca. If not, see <http://www.gnu.org/licenses/>.
17 17
18m4_version_prereq([2.52g]) 18m4_version_prereq([2.52g])
19 19
20m4_define([AT_SKIP_TEST],[exit 77]) 20m4_define([AT_SKIP_TEST],[exit 77])
21dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
22m4_define([AT_SORT_PREREQ],[
23test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST
24])
21 25
22AT_INIT 26AT_INIT
23AT_TESTED([wydawca]) 27AT_TESTED([wydawca])
24m4_include([version.at]) 28m4_include([version.at])
25m4_include([wordsplit.at]) 29m4_include([wordsplit.at])
26m4_include([pushdir.at]) 30m4_include([pushdir.at])
diff --git a/tests/upload-dry.at b/tests/upload-dry.at
index 2116af2..e2e4063 100644
--- a/tests/upload-dry.at
+++ b/tests/upload-dry.at
@@ -18,15 +18,12 @@ AT_SETUP([Dry-run upload])
18 18
19AT_DATA([template], 19AT_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
21wydawca: [[DEBUG]] @WD_SRC@/ok -> @WD_DST@ 21wydawca: [[DEBUG]] @WD_SRC@/ok -> @WD_DST@
22wydawca: [[DEBUG]] @WD_SRC@/fail -> @WD_DST@ 22wydawca: [[DEBUG]] @WD_SRC@/fail -> @WD_DST@
23wydawca: [[DEBUG]] @WD_SRC@/test -> @WD_DST@ 23wydawca: [[DEBUG]] @WD_SRC@/test -> @WD_DST@
24wydawca: [[DEBUG]] found file file: distributive, stem: file
25wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file
26wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file
27wydawca: [[DEBUG]] processing spool test (@WD_DST@) 24wydawca: [[DEBUG]] processing spool test (@WD_DST@)
28wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc 25wydawca: [[DEBUG]] FILE file, DIST=file, SIG=file.sig, DIRECTIVE=file.directive.asc
29wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua> 26wydawca: [[NOTICE]] Good signature from Wydawca (Testsuite) <bug-wydawca@gnu.org.ua>
30wydawca: [[DEBUG]] file: directive file signature OK 27wydawca: [[DEBUG]] file: directive file signature OK
31wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1 28wydawca: [[NOTICE]] file.directive.asc: VERSION: 1.1
32wydawca: [[DEBUG]] processing triplet `file' 29wydawca: [[DEBUG]] processing triplet `file'
@@ -48,22 +45,28 @@ wydawca: [[INFO]] files archived: 0
48wydawca: [[INFO]] symlinks created: 0 45wydawca: [[INFO]] symlinks created: 0
49wydawca: [[INFO]] symlinks removed: 0 46wydawca: [[INFO]] symlinks removed: 0
50wydawca: [[INFO]] check failures: 0 47wydawca: [[INFO]] check failures: 0
51wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished 48wydawca: [[NOTICE]] AT_PACKAGE_TARNAME (AT_PACKAGE_NAME AT_PACKAGE_VERSION) finished
52]) 49])
53 50
54AT_CHECK([ 51AT_CHECK([AT_SORT_PREREQ
55wydawca_init_testdirs 52wydawca_init_testdirs
56wydawca_config wydawca.rc 53wydawca_config wydawca.rc
57wydawca_upload test file 54wydawca_upload test file
58 55
59wydawca_expandmeta template experr 56wydawca_expandmeta template experr
60 57set -e
61wydawca --no-preproc --dry-run -c wydawca.rc 58wydawca --no-preproc --dry-run -c wydawca.rc 2>err
59set +e
60grep "found file" err | sort
61grep -v "found file" err >&2
62], 62],
63[0], 63[0],
64[], 64[wydawca: [[DEBUG]] found file file.directive.asc: signed upload directive, stem: file
65wydawca: [[DEBUG]] found file file.sig: detached signature, stem: file
66wydawca: [[DEBUG]] found file file: distributive, stem: file
67],
65[experr]) 68[experr])
66 69
67wydawca_clean_testdirs 70wydawca_clean_testdirs
68 71
69AT_CLEANUP 72AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.