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.25 -r1.26 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 26 Jan 2004 15:39:42 -0000 1.25 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 12 Feb 2004 12:59:47 -0000 1.26 @@ -908,3 +908,62 @@ unset aa_rollback_test_statements } } + + +namespace eval aa_test {} + +ad_proc -public aa_test::parse_test_server_file { + {-name:required} + {-array:required} +} { + Processes the xml report outputted from install.sh for display. +} + upvar 1 $array service + + set path /var/log/openacs/test/$name + + set tree [xml_parse -persist [template::util::read_file $path]] + + set root_node [xml_doc_get_first_node $tree] + + foreach entry { + name os dbtype dbversion webserver openacs_cvs_flag adminemail adminpassword + install_begin_epoch install_end_epoch install_end_timestamp num_errors + install_duration install_duration_pretty script_path + } { + set service($entry) "n/a" + } + set service(path) $path + set service(filename) $name + set service(parse_errors) {} + + set service(name) [xml_node_get_attribute $root_node "name"] + if { [empty_string_p $service(name)] } { + append service(parse_error) "No service name attribute;" + } + + foreach child [xml_node_get_children $root_node] { + set info_type [xml_node_get_attribute $child "type"] + if { [empty_string_p $info_type] } { + append service(parse_error) "No type on info tag;" + continue + } + set info_type [string map {- _} $info_type] + set info_value [xml_node_get_content $child] + set service($info_type) $info_value + } + + if { [string is integer -strict $service(install_begin_epoch)] && [string is integer -strict $service(install_end_epoch)] } { + set service(install_duration) [expr $service(install_end_epoch) - $service(install_begin_epoch)] + set service(install_duration_pretty) [util::interval_pretty -seconds $service(install_duration)] + } + + # TODO: Not working + set service(admin_login_url) "$service(url)register/?[export_vars { { email $service(adminemail) } { password $service(adminpassword) } }]" + + set service(auto_test_url) "$service(url)test/admin" + + set service(rebuild_cmd) "sh [file join $service(script_path) recreate.sh]" +} + + 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/admin/install/report.adp 12 Feb 2004 12:59:47 -0000 1.1 @@ -0,0 +1,15 @@ + + @page_title@ + @context@ + + 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/admin/install/report.tcl 12 Feb 2004 12:59:47 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + Test servers control page. +} + +set page_title "Test Servers Control Page" +set context [list] +multirow create servers path url name install_date error_total_count parse_errors + +foreach file [glob /var/log/openacs-install/*.xml] { + parse_test_server_file -name [file tail $file] -array service + multirow append servers \ + $service(path) \ + "server?[export_vars { { name "$service(filename)" } }]" \ + $service(name) \ + $service(install_end_timestamp) \ + $service(num_errors) \ + $service(parse_errors) +} Index: openacs-4/packages/acs-automated-testing/www/admin/install/server.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/install/Attic/server.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/admin/install/server.adp 12 Feb 2004 12:59:47 -0000 1.1 @@ -0,0 +1,59 @@ + + @page_title@ + @context@ + + + +

Rebuild

+ + + +

Tar-ball

+ +

+ TODO +

Index: openacs-4/packages/acs-automated-testing/www/admin/install/server.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/admin/install/Attic/server.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-automated-testing/www/admin/install/server.tcl 12 Feb 2004 12:59:47 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + Control page for an individual server. +} { + name:notnull +} + +parse_test_server_file -name $name -array service + +set page_title "Control Page For $service(name)" +set context [list $page_title] +