summaryrefslogtreecommitdiff
path: root/source4/script/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-04-19 01:23:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:06 -0500
commitefe1883d9b278d97715cdc62cc50a105b2e455b2 (patch)
treec2386f7ab22a4f67419723567166299cea3e2f5f /source4/script/tests
parentc8151033bf5ef8125495dccf6900dac8d82057bb (diff)
downloadsamba-efe1883d9b278d97715cdc62cc50a105b2e455b2.tar.gz
samba-efe1883d9b278d97715cdc62cc50a105b2e455b2.tar.bz2
samba-efe1883d9b278d97715cdc62cc50a105b2e455b2.zip
r22356: Simple refactoring.
(This used to be commit 913aa17b0278e0861f2662768453e436a3d71e1e)
Diffstat (limited to 'source4/script/tests')
-rwxr-xr-xsource4/script/tests/selftest.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/script/tests/selftest.pl b/source4/script/tests/selftest.pl
index e991d0a3d6..747f0d100a 100755
--- a/source4/script/tests/selftest.pl
+++ b/source4/script/tests/selftest.pl
@@ -672,6 +672,12 @@ sub teardown_env($)
delete $running_envs{$envname};
}
+my $msg_ops;
+if ($from_build_farm) {
+ $msg_ops = $buildfarm_msg_ops;
+} else {
+ $msg_ops = $plain_msg_ops;
+}
if ($opt_testenv) {
my $testenv_vars = setup_env("dc");
@@ -708,12 +714,8 @@ NETBIOSNAME=\$NETBIOSNAME\" && bash'");
my $pcap_file = "$pcap_dir/$shname.cap";
SocketWrapper::setup_pcap($pcap_file) if ($opt_socket_wrapper_pcap);
- my $result;
- if ($from_build_farm) {
- $result = run_test($envname, $name, $cmd, $i, $suitestotal, $buildfarm_msg_ops);
- } else {
- $result = run_test($envname, $name, $cmd, $i, $suitestotal, $plain_msg_ops);
- }
+ my $result = run_test($envname, $name, $cmd, $i, $suitestotal,
+ $msg_ops);
if ($opt_socket_wrapper_pcap and $result and
not $opt_socket_wrapper_keep_pcap) {
@@ -738,7 +740,8 @@ my $end = time();
my $duration = ($end-$start);
my $numfailed = $#$suitesfailed+1;
if ($numfailed == 0) {
- my $ok = $statistics->{TESTS_EXPECTED_OK} + $statistics->{TESTS_EXPECTED_FAIL};
+ my $ok = $statistics->{TESTS_EXPECTED_OK} +
+ $statistics->{TESTS_EXPECTED_FAIL};
print "ALL OK ($ok tests in $statistics->{SUITES_OK} testsuites)\n";
} else {
unless ($from_build_farm) {