git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testsuite: find a group name if 'mail' is not available.
[exim.git]
/
test
/
runtest
diff --git
a/test/runtest
b/test/runtest
index eee02436d9a13f5ca868f8bf0ccd0174997f692a..78cd051d38da314f4b1ca3ff41681dc1ce2c6b69 100755
(executable)
--- a/
test/runtest
+++ b/
test/runtest
@@
-26,6
+26,11
@@
use Socket;
use Time::Local;
use Cwd;
use File::Basename;
use Time::Local;
use Cwd;
use File::Basename;
+use FindBin qw'$Bin';
+
+use lib "$Bin/lib";
+use Exim::Runtest;
+
use if $ENV{DEBUG} && $ENV{DEBUG} =~ /\bruntest\b/ => ('Smart::Comments' => '####');
use if $ENV{DEBUG} && $ENV{DEBUG} =~ /\bruntest\b/ => ('Smart::Comments' => '####');
@@
-88,6
+93,10
@@
$parm_port_d3 = 1227; # Additional for daemon
$parm_port_d4 = 1228; # Additional for daemon
my $dynamic_socket; # allocated later for PORT_DYNAMIC
$parm_port_d4 = 1228; # Additional for daemon
my $dynamic_socket; # allocated later for PORT_DYNAMIC
+# Find a suiteable group name for test (currently only 0001
+# uses a group name. A numeric group id would do
+my $parm_mailgroup = Exim::Runtest::mailgroup('mail');
+
# Manually set locale
$ENV{LC_ALL} = 'C';
# Manually set locale
$ENV{LC_ALL} = 'C';
@@
-149,6
+158,7
@@
s?\bTESTNUM\b?$_[0]?g;
s?(\b|_)V4NET([\._])?$1$parm_ipv4_test_net$2?g;
s?\bV6NET:?$parm_ipv6_test_net:?g;
s?\bPORT_DYNAMIC\b?$dynamic_socket->sockport()?eg;
s?(\b|_)V4NET([\._])?$1$parm_ipv4_test_net$2?g;
s?\bV6NET:?$parm_ipv6_test_net:?g;
s?\bPORT_DYNAMIC\b?$dynamic_socket->sockport()?eg;
+s?\bMAILGROUP\b?$parm_mailgroup?g;
}
}
@@
-3614,7
+3624,12
@@
closedir(DIR);
# contains ****. We open input from the terminal so that we can read responses
# to prompts.
# contains ****. We open input from the terminal so that we can read responses
# to prompts.
-open(T, "/dev/tty") || tests_exit(-1, "Failed to open /dev/tty: $!");
+if (not $force_continue) {
+ # runtest needs to interact if we're not in continue
+ # mode. It does so by communicate to /dev/tty
+ open(T, "/dev/tty") or tests_exit(-1, "Failed to open /dev/tty: $!");
+}
+
print "\nPress RETURN to run the tests: ";
$_ = $force_continue ? "c" : <T>;
print "\nPress RETURN to run the tests: ";
$_ = $force_continue ? "c" : <T>;