Index: openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 17 Feb 2004 08:44:01 -0000 1.30 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 24 Feb 2004 13:13:13 -0000 1.31 @@ -1019,8 +1019,7 @@ namespace eval aa_test {} ad_proc -public aa_test::xml_report_dir {} { - # TODO: make this a parameter - return "/var/log/openacs-install" + return [parameter::get -parameter XMLReportDir] } ad_proc -private aa_test::test_file_path { @@ -1138,22 +1137,22 @@ @author Peter Marklund } { - set xml_doc [get_test_doc] + set xml_doc "" - set hostname [exec hostname] - set server [ns_info server] - set report_dir [aa_test::xml_report_dir] + if { [file isdirectory $report_dir] } { - if { ![file isdirectory $report_dir] } { - if { [catch {exec mkdir -p $report_dir} errmsg] } { - ns_log Error "Could not create directory $report_dir to write xml test report to. Not generating report" - return "" + set hostname [exec hostname] + set server [ns_info server] + set file_path "$report_dir/${hostname}-${server}-testreport.xml" + + set xml_doc [get_test_doc] + + if { [catch {template::util::write_file $file_path $xml_doc} errmsg] } { + ns_log Error "Failed to write xml test report to path $file_path - $errmsg" } } - template::util::write_file "$report_dir/${hostname}-${server}-testreport.xml" $xml_doc - return $xml_doc } Index: openacs-4/packages/acs-automated-testing/www/admin/install/report.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/install/Attic/report.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-automated-testing/www/admin/install/report.adp 12 Feb 2004 12:59:47 -0000 1.1 +++ openacs-4/packages/acs-automated-testing/www/admin/install/report.adp 24 Feb 2004 13:13:13 -0000 1.2 @@ -13,3 +13,7 @@ + + + The XMLReportDir parameter is empty so a server listing cannot be generated. + \ No newline at end of file Index: openacs-4/packages/acs-automated-testing/www/admin/install/report.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/install/Attic/report.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-automated-testing/www/admin/install/report.tcl 16 Feb 2004 16:49:21 -0000 1.2 +++ openacs-4/packages/acs-automated-testing/www/admin/install/report.tcl 24 Feb 2004 13:13:13 -0000 1.3 @@ -6,21 +6,24 @@ set context [list] multirow create servers path url name install_date error_total_count parse_errors -foreach path [glob [aa_test::xml_report_dir]/*-installreport.xml] { - aa_test::parse_install_file -path $path -array service +set xml_report_dir [aa_test::xml_report_dir] +if { ![empty_string_p $xml_report_dir] } { + foreach path [glob $xml_report_dir/*-installreport.xml] { + aa_test::parse_install_file -path $path -array service - set test_path [aa_test::test_file_path -install_file_path $path] - if { [file exists $test_path] } { - aa_test::parse_test_file -path $test_path -array test - array set testcase_failure $test(testcase_failure) - set service(num_errors) [llength [array names testcase_failure]] - } + set test_path [aa_test::test_file_path -install_file_path $path] + if { [file exists $test_path] } { + aa_test::parse_test_file -path $test_path -array test + array set testcase_failure $test(testcase_failure) + set service(num_errors) [llength [array names testcase_failure]] + } - multirow append servers \ - $service(path) \ - [export_vars -base server { path }] \ - $service(name) \ - $service(install_end_timestamp) \ - $service(num_errors) \ - $service(parse_errors) -} + multirow append servers \ + $service(path) \ + [export_vars -base server { path }] \ + $service(name) \ + $service(install_end_timestamp) \ + $service(num_errors) \ + $service(parse_errors) + } +} \ No newline at end of file