mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
More work supporting prefixes.
This commit is contained in:
parent
16a69f358a
commit
c278ee50ee
@ -50,6 +50,8 @@ failure: <NAME> [ REASON ]
|
||||
Announce that the test with the specified name failed. Optionally, it is
|
||||
possible to specify a reason it failed.
|
||||
|
||||
The alias "fail" will also work.
|
||||
|
||||
xfail
|
||||
~~~~~
|
||||
xfail: <NAME>
|
||||
@ -57,6 +59,8 @@ xfail: <NAME> [ REASON ]
|
||||
|
||||
Announce that the test with the specified name failed but that the failure
|
||||
was expected, e.g. it's a test for a known bug that hasn't been fixed yet.
|
||||
Alternatively it is also possible to simply return "failure:" here but
|
||||
specify in the samba4-knownfailures file that it is failing.
|
||||
|
||||
skip
|
||||
~~~~
|
||||
@ -66,14 +70,19 @@ skip: <NAME> [ REASON ]
|
||||
Announce that the test with the specified name was skipped. Optionally a
|
||||
reason can be specified.
|
||||
|
||||
knownfail
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
knownfail: <NAME>
|
||||
knownfail: <NAME> [ REASON ]
|
||||
time
|
||||
~~~~
|
||||
time: YYYY-MM-DD HH:mm:ssZ
|
||||
|
||||
Announce that the test with the specified name was run and failed as expected.
|
||||
Alternatively it is also possible to simply return "failure:" here but
|
||||
specify in the samba4-knownfailures file that it is failing.
|
||||
Announce the current time. This may be used to calculate the duration of
|
||||
various tests.
|
||||
|
||||
prefix
|
||||
~~~~~~
|
||||
prefix: Prefix
|
||||
|
||||
Change the global prefix for test names. To unset the prefix, specify an empty
|
||||
string.
|
||||
|
||||
Environments
|
||||
============
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Simple Perl module for parsing the Subunit protocol
|
||||
# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Perl module for parsing and generating the Subunit protocol
|
||||
# Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@samba.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -29,6 +29,7 @@ sub parse_results($$$$)
|
||||
my $unexpected_ok = 0;
|
||||
my $expected_fail = 0;
|
||||
my $unexpected_fail = 0;
|
||||
my $prefix = "";
|
||||
my $unexpected_err = 0;
|
||||
my $orig_open_len = $#$open_tests;
|
||||
|
||||
@ -39,6 +40,8 @@ sub parse_results($$$$)
|
||||
push (@$open_tests, $1);
|
||||
} elsif (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)Z\n/) {
|
||||
$msg_ops->report_time(mktime($6, $5, $4, $3, $2, $1));
|
||||
} elsif (/^prefix: (.*)\n/) {
|
||||
$prefix = $1;
|
||||
} elsif (/^(success|successful|failure|fail|skip|knownfail|error|xfail): (.*?)( \[)?([ \t]*)\n/) {
|
||||
$msg_ops->control_msg($_);
|
||||
my $result = $1;
|
||||
@ -133,4 +136,10 @@ sub report_time($)
|
||||
printf "time: %04d-%02d-%02d %02d:%02d:%02dZ\n", $year+1900, $mon, $mday, $hour, $min, $sec;
|
||||
}
|
||||
|
||||
sub prefix($)
|
||||
{
|
||||
my ($prefix) = @_;
|
||||
print "prefix: $prefix\n";
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -217,6 +217,7 @@ sub run_testsuite($$$$$)
|
||||
my $pcap_file = setup_pcap($name);
|
||||
|
||||
Subunit::report_time(time());
|
||||
Subunit::prefix($name);
|
||||
Subunit::start_test($name);
|
||||
|
||||
my $ret = system("$cmd 2>&1");
|
||||
@ -226,10 +227,10 @@ sub run_testsuite($$$$$)
|
||||
}
|
||||
my $envlog = getlog_env($envname);
|
||||
if ($envlog ne "") {
|
||||
print "ENVLOG: $envlog\n";
|
||||
print "envlog: $envlog\n";
|
||||
}
|
||||
|
||||
print "CMD: $cmd\n";
|
||||
print "command: $cmd\n";
|
||||
|
||||
my $exitcode = $ret >> 8;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user