Index: openacs-4/packages/acs-automated-testing/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-automated-testing/www/index.tcl 25 Feb 2003 14:43:31 -0000 1.1 +++ openacs-4/packages/acs-automated-testing/www/index.tcl 24 Feb 2004 14:15:01 -0000 1.2 @@ -1 +1,37 @@ -ad_returnredirect admin \ No newline at end of file +ad_page_contract { + Typically redirects to the admin index page which displays information about test cases + on this server. However, if this is an install/test reporting server (see parameter IsInstallReportServer) then + show the list of installed servers here. +} + +if { ![parameter::get -boolean -parameter IsInstallReportServer] } { + ad_returnredirect admin + ad_script_abort +} + +set page_title "Test Servers Control Page" +set context [list] +multirow create servers path url name description install_date error_total_count parse_errors + +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]] + } + + multirow append servers \ + $service(path) \ + [export_vars -base server { path }] \ + $service(name) \ + $service(description) \ + $service(install_end_timestamp) \ + $service(num_errors) \ + $service(parse_errors) + } +}