diff --git a/inc/always.php b/inc/always.php index 273d522e..a7b19b23 100644 --- a/inc/always.php +++ b/inc/always.php @@ -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 ); diff --git a/inc/always.php.in b/inc/always.php.in index 71c2138d..881ef87e 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -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 ); diff --git a/testing/dav_test b/testing/dav_test index 978fa74e..36e66782 100755 --- a/testing/dav_test +++ b/testing/dav_test @@ -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( ) { my $line = $_;