mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-23 17:26:02 +00:00
Add a test header and log it to help find which tests cause problems.
This commit is contained in:
parent
58356fb3e3
commit
1296bded43
@ -121,7 +121,10 @@ if ( isset($c->deny_put_collection) ) {
|
||||
|
||||
if ( !isset($c->page_title) ) $c->page_title = $c->system_name;
|
||||
|
||||
if ( count($c->dbg) > 0 ) {
|
||||
if ( isset($_SERVER['HTTP_X_DAVICAL_TESTCASE']) ) {
|
||||
@dbg_error_log( 'LOG', '==========> Test case =%s=', $_SERVER['HTTP_X_DAVICAL_TESTCASE'] );
|
||||
}
|
||||
else if ( count($c->dbg) > 0 ) {
|
||||
// Only log this if debugging of some sort is turned on, somewhere
|
||||
@dbg_error_log( 'LOG', '==========> method =%s= =%s= =%s= =%s= =%s=',
|
||||
$_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, $_SERVER['PATH_INFO'], $c->base_url, $c->base_directory );
|
||||
|
||||
@ -121,7 +121,10 @@ if ( isset($c->deny_put_collection) ) {
|
||||
|
||||
if ( !isset($c->page_title) ) $c->page_title = $c->system_name;
|
||||
|
||||
if ( count($c->dbg) > 0 ) {
|
||||
if ( isset($_SERVER['HTTP_X_DAVICAL_TESTCASE']) ) {
|
||||
@dbg_error_log( 'LOG', '==========> Test case =%s=', $_SERVER['HTTP_X_DAVICAL_TESTCASE'] );
|
||||
}
|
||||
else if ( count($c->dbg) > 0 ) {
|
||||
// Only log this if debugging of some sort is turned on, somewhere
|
||||
@dbg_error_log( 'LOG', '==========> method =%s= =%s= =%s= =%s= =%s=',
|
||||
$_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, $_SERVER['PATH_INFO'], $c->base_url, $c->base_directory );
|
||||
|
||||
@ -55,6 +55,7 @@ if ( !defined($testdef) ) {
|
||||
|
||||
my $datafile = $testdef;
|
||||
$datafile =~ s{\.test$}{};
|
||||
push @arguments, "--header", 'X-DAViCal-Testcase: '.$datafile;
|
||||
$datafile .= '.data';
|
||||
|
||||
my $state = "";
|
||||
@ -66,6 +67,7 @@ my $sql_values = {};
|
||||
my $queries = ();
|
||||
my $replacements = ();
|
||||
|
||||
|
||||
open( TEST, '<', $testdef ) or die "Can't open '$testdef'";
|
||||
while( <TEST> ) {
|
||||
my $line = $_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user