summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-07-16 04:27:42 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-07-16 04:27:42 (GMT)
commit861600de7d6166ac4d16f7e01e1feb8344085be4 (patch) (side-by-side diff)
tree3ee6d796b8b6b5144108c1186a409d937aa67a0d
parenta53b0c3a7d0eda43e36848f511750a72cddd70dd (diff)
downloadwydawca-861600de7d6166ac4d16f7e01e1feb8344085be4.tar.gz
wydawca-861600de7d6166ac4d16f7e01e1feb8344085be4.tar.bz2
Fix testsuite when run as root
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--tests/atlocal.in8
-rw-r--r--tests/check-fail.at2
-rw-r--r--tests/check-notify.at2
-rw-r--r--tests/check-ok.at2
-rw-r--r--tests/mailstats.at4
-rw-r--r--tests/notify-upl.at2
-rw-r--r--tests/upl11.at2
-rw-r--r--tests/upl12f.at2
-rw-r--r--tests/upl12t.at2
-rw-r--r--tests/upload-dry.at2
-rw-r--r--tests/upload.at2
11 files changed, 19 insertions, 11 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 04a6fc9..664d29f 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -16,6 +16,14 @@ WY_TESTDIR=@abs_top_builddir@/tests
WY_MAILUTILS=@WY_MAILUTILS@
MKDIR_P="@MKDIR_P@"
+if test -w /; then
+ WY_FORCE=--force
+else
+ WY_FORCE=
+fi
+
+ulimit -c unlimited
+
wydawca_init_testdirs() {
for dir in "$WY_SRC" "$WY_SRC/test" "${WY_SRC}/fail" "${WY_SRC}/ok" "$WY_DST"
do
diff --git a/tests/check-fail.at b/tests/check-fail.at
index fce7de5..2a441e9 100644
--- a/tests/check-fail.at
+++ b/tests/check-fail.at
@@ -49,7 +49,7 @@ wydawca_upload fail file
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc
+wydawca $WY_FORCE --no-preproc -c wydawca.rc
],
[0],
[],
diff --git a/tests/check-notify.at b/tests/check-notify.at
index d5a72fa..ff83bbd 100644
--- a/tests/check-notify.at
+++ b/tests/check-notify.at
@@ -78,7 +78,7 @@ wydawca_upload fail file
wydawca_expandmeta outtmpl expout
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
cat $WY_DST/mail.out
],
[0],
diff --git a/tests/check-ok.at b/tests/check-ok.at
index 3cb1cb1..d3871d9 100644
--- a/tests/check-ok.at
+++ b/tests/check-ok.at
@@ -45,7 +45,7 @@ wydawca_upload ok file
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
],
[0],
diff --git a/tests/mailstats.at b/tests/mailstats.at
index 4ba7bd3..491f94e 100644
--- a/tests/mailstats.at
+++ b/tests/mailstats.at
@@ -73,8 +73,8 @@ cat mailstats.rc >> wydawca.rc
wydawca_upload test file
wydawca_expandmeta errtmpl experr
-ulimit -c unlimited
-wydawca --no-preproc -c wydawca.rc || exit $?
+
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
cat $WY_DST/mail.out
],
diff --git a/tests/notify-upl.at b/tests/notify-upl.at
index 6c77e82..cbb5d4d 100644
--- a/tests/notify-upl.at
+++ b/tests/notify-upl.at
@@ -87,7 +87,7 @@ wydawca_expandmeta errtmpl experr
wydawca_expandmeta outtmpl expout
wydawca_expandmeta ls.sin ls.sed
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
cat $WY_DST/mail.out | sed -f ls.sed
],
diff --git a/tests/upl11.at b/tests/upl11.at
index ba413be..bc9e8b1 100644
--- a/tests/upl11.at
+++ b/tests/upl11.at
@@ -50,7 +50,7 @@ wydawca_upload test file
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
wydawca_cmparc proj file file.sig
],
diff --git a/tests/upl12f.at b/tests/upl12f.at
index 046d985..d5f001c 100644
--- a/tests/upl12f.at
+++ b/tests/upl12f.at
@@ -54,7 +54,7 @@ wydawca_upload test file file12f.directive.asc
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
],
[0],
diff --git a/tests/upl12t.at b/tests/upl12t.at
index f81f134..180ff4a 100644
--- a/tests/upl12t.at
+++ b/tests/upl12t.at
@@ -50,7 +50,7 @@ wydawca_upload test file file12t.directive.asc
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
wydawca_cmparc proj file file.sig
],
diff --git a/tests/upload-dry.at b/tests/upload-dry.at
index 37d0b5b..77a3212 100644
--- a/tests/upload-dry.at
+++ b/tests/upload-dry.at
@@ -55,7 +55,7 @@ wydawca_upload test file
wydawca_expandmeta template experr
set -e
-wydawca --no-preproc --dry-run -c wydawca.rc 2>err
+wydawca $WY_FORCE --no-preproc --dry-run -c wydawca.rc 2>err
set +e
grep "found file" err | sort
grep -v "found file" err >&2
diff --git a/tests/upload.at b/tests/upload.at
index ee0f3b7..b88e5df 100644
--- a/tests/upload.at
+++ b/tests/upload.at
@@ -44,7 +44,7 @@ wydawca_upload test file
wydawca_expandmeta template experr
-wydawca --no-preproc -c wydawca.rc || exit $?
+wydawca $WY_FORCE --no-preproc -c wydawca.rc || exit $?
wydawca_cmp proj file file.sig
],
[0],

Return to:

Send suggestions and report system problems to the System administrator.