diff options
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/output/plain.pm | 25 | ||||
-rwxr-xr-x | selftest/selftest.pl | 7 | ||||
-rw-r--r-- | selftest/target/Samba4.pm | 27 |
3 files changed, 36 insertions, 23 deletions
diff --git a/selftest/output/plain.pm b/selftest/output/plain.pm index 4bec4e0fdc..4e1e290534 100644 --- a/selftest/output/plain.pm +++ b/selftest/output/plain.pm @@ -48,10 +48,7 @@ sub start_testsuite($$) if ($self->{immediate}) { print "$out\n"; } else { - require Term::ReadKey; - my ($wchar, $hchar, $wpixels, $hpixels) = Term::ReadKey::GetTerminalSize(); - foreach (1..$wchar) { $out.= " "; } - print "\r".substr($out, 0, $wchar); + print "$out: "; } } @@ -94,6 +91,13 @@ sub end_testsuite($$$$$) $out .= $self->{test_output}->{$name}; } + if (not $self->{immediate}) { + if (not $unexpected) { + $out .= " ok\n"; + } else { + $out .= " " . uc($result) . "\n"; + } + } print $out; } @@ -120,6 +124,12 @@ sub end_test($$$$$) unless ($unexpected) { $self->{test_output}->{$self->{NAME}} = ""; + if (not $self->{immediate}) { + if ($result eq "failure") { print "f"; } + elsif ($result eq "skip") { print "s"; } + elsif ($result eq "success") { print "."; } + else { print "?($result)"; } + } return; } @@ -133,6 +143,13 @@ sub end_test($$$$$) print $self->{test_output}->{$self->{NAME}}; $self->{test_output}->{$self->{NAME}} = ""; } + + if (not $self->{immediate}) { + if ($result eq "error") { print "E"; } + elsif ($result eq "failure") { print "F"; } + elsif ($result eq "success") { print "S"; } + else { print "?"; } + } } sub summary($) diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 84b2f52058..1477d10d46 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -303,7 +303,7 @@ Target Specific: --expected-failures=FILE specify list of tests that is guaranteed to fail Samba4 Specific: - --ldap=openldap|fedora-ds back smbd onto specified ldap server + --ldap=openldap|fedora-ds back samba onto specified ldap server Samba3 Specific: --bindir=PATH path to binaries @@ -417,8 +417,6 @@ sub prefix_pathvar($$) } } prefix_pathvar("PKG_CONFIG_PATH", "$old_pwd/source4/bin/pkgconfig"); -# Required for smbscript: -prefix_pathvar("PATH", "$old_pwd/source4/bin"); prefix_pathvar("PYTHONPATH", "$old_pwd/source4/bin/python"); if ($opt_socket_wrapper_keep_pcap) { @@ -576,7 +574,6 @@ sub write_clientconf($$) } print CF " private dir = $prefix_abs/client/private - js include = $srcdir_abs/scripting/libjs name resolve order = bcast panic action = $srcdir_abs/script/gdb_backtrace \%PID\% \%PROG\% max xmit = 32K @@ -812,7 +809,7 @@ if ($opt_testenv) { Welcome to the Samba4 Test environment '$testenv_name' This matches the client environment used in make test -smbd is pid `cat \$PIDDIR/smbd.pid` +server is pid `cat \$PIDDIR/samba.pid` Some useful environment variables: TORTURE_OPTIONS=\$TORTURE_OPTIONS diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 8835f69c6c..9364008ee2 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -116,20 +116,20 @@ sub check_or_start($$$) if (defined($ENV{SMBD_OPTIONS})) { $optarg.= " $ENV{SMBD_OPTIONS}"; } - my $ret = system("$valgrind $self->{bindir}/smbd $optarg $env_vars->{CONFIGURATION} -M single -i --leak-report-full"); + my $ret = system("$valgrind $self->{bindir}/samba $optarg $env_vars->{CONFIGURATION} -M single -i --leak-report-full"); if ($? == -1) { - print "Unable to start smbd: $ret: $!\n"; + print "Unable to start samba: $ret: $!\n"; exit 1; } unlink($env_vars->{SMBD_TEST_FIFO}); my $exit = $? >> 8; if ( $ret == 0 ) { - print "smbd exits with status $exit\n"; + print "samba exits with status $exit\n"; } elsif ( $ret & 127 ) { - print "smbd got signal ".($ret & 127)." and exits with $exit!\n"; + print "samba got signal ".($ret & 127)." and exits with $exit!\n"; } else { $ret = $? >> 8; - print "smbd failed with status $exit!\n"; + print "samba failed with status $exit!\n"; } exit $exit; } @@ -498,7 +498,7 @@ sub provision($$$$$$) { my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password) = @_; - my $smbd_loglevel = 1; + my $server_loglevel = 1; my $username = "administrator"; my $domain = "SAMBADOMAIN"; my $realm = "SAMBA.EXAMPLE.COM"; @@ -555,7 +555,6 @@ sub provision($$$$$$) lock dir = $lockdir setup directory = $self->{setupdir} modules dir = $self->{bindir}/modules - js include = $srcdir/scripting/libjs winbindd socket directory = $winbindd_socket_dir winbindd privileged socket directory = $winbindd_privileged_socket_dir ntp signd socket directory = $ntp_signd_socket_dir @@ -572,7 +571,7 @@ sub provision($$$$$$) ldb:nosync = true #We don't want to pass our self-tests if the PAC code is wrong gensec:require_pac = true - log level = $smbd_loglevel + log level = $server_loglevel [tmp] path = $tmpdir @@ -607,7 +606,7 @@ sub provision($$$$$$) cifs:server = $netbiosname cifs:share = tmp #There is no username specified here, instead the client is expected -#to log in with kerberos, and smbd will used delegated credentials. +#to log in with kerberos, and the serverwill use delegated credentials. [simple] path = $tmpdir @@ -829,8 +828,8 @@ sub provision_dc($$) $self->add_wins_config("$prefix/private") or die("Unable to add wins configuration"); - $ret->{SMBD_TEST_FIFO} = "$prefix/smbd_test.fifo"; - $ret->{SMBD_TEST_LOG} = "$prefix/smbd_test.log"; + $ret->{SMBD_TEST_FIFO} = "$prefix/server_test.fifo"; + $ret->{SMBD_TEST_LOG} = "$prefix/server_test.log"; $ret->{SMBD_TEST_LOG_POS} = 0; return $ret; } @@ -842,8 +841,8 @@ sub teardown_env($$) close(DATA); - if (-f "$envvars->{PIDDIR}/smbd.pid" ) { - open(IN, "<$envvars->{PIDDIR}/smbd.pid") or die("unable to open smbd pid file"); + if (-f "$envvars->{PIDDIR}/samba.pid" ) { + open(IN, "<$envvars->{PIDDIR}/samba.pid") or die("unable to open server pid file"); $pid = <IN>; close(IN); @@ -859,7 +858,7 @@ sub teardown_env($$) # If it is still around, kill it if ($count > 20) { - print "smbd process $pid took more than $count seconds to exit, killing\n"; + print "server process $pid took more than $count seconds to exit, killing\n"; kill 9, $pid; } } |