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 -N -r1.43 -r1.44 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 19 Mar 2018 13:40:50 -0000 1.43 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 19 Mar 2018 13:41:59 -0000 1.44 @@ -9,15 +9,15 @@ ad_library { Procs to support the acs-automated-testing package. - NOTE: There's a hack in packages/acs-bootstrap-installer/bootstrap.tcl to load + NOTE: There's a hack in packages/acs-bootstrap-installer/bootstrap.tcl to load this file on server startup before other packages' -procs files. - + @author Peter Harper (peter.harper@open-msg.com) @creation-date 21 June 2001 @cvs-id $Id$ } -# LARS: We do this here, because if we do it in the -init file, then we cannot register +# LARS: We do this here, because if we do it in the -init file, then we cannot register # test cases in -procs files of packages. if { ![nsv_exists aa_test cases] } { nsv_set aa_test cases {} @@ -29,7 +29,7 @@ nsv_lappend aa_test categories "selenium" } else { nsv_lappend aa_test exclusion_categories "selenium" - } + } } proc aa_proc_copy {proc_name_old proc_name_new {new_body ""}} { @@ -114,7 +114,7 @@ aa_proc_copy $proc_name ${proc_name}_unstubbed } set aa_stub_sequence($proc_name) 1 - + aa_proc_copy $proc_name $proc_name " global aa_stub_sequence global aa_testcase_id @@ -345,17 +345,17 @@
Call this function within a testcase, stub or component.
-
+
@return True if the affirmation passed, false otherwise.
@author Peter Harper
@creation-date 24 July 2001
} {
global aa_testcase_id
global aa_package_key
-
+
set result [uplevel 1 [list expr $affirm_expr]]
if { $result } {
aa_log_result "pass" "$affirm_name Affirm PASSED, \"$affirm_expr\" true"
@@ -798,9 +798,9 @@
} {
Tests that affirm_expr is false.
Call this function within a testcase, stub or component.
-
+
@return True if the affirmation passed, false otherwise.
-
+
@author Peter Harper
@creation-date 24 July 2001
} {
@@ -941,7 +941,7 @@
{-teardown_code ""}
-rollback:boolean
} {
- Execute code in test_code and guarantee that code in
+ Execute code in test_code and guarantee that code in
teardown_code will be executed even if error is thrown. Will catch
errors in teardown_code as well and provide stack traces for both code blocks.
@@ -959,7 +959,7 @@
set errmsg {}
db_transaction {
aa_start_rollback_block
-
+
$test_code
aa_end_rollback_block
@@ -1094,8 +1094,8 @@
{-install_file_path:required}
} {
set filename [file tail $install_file_path]
- regexp {^(.+)-(.+)-(.+)\.xml$} $filename match hostname server
- set test_path [file dirname $install_file_path]/${hostname}-${server}-testreport.xml
+ regexp {^(.+)-(.+)-(.+)\.xml$} $filename match hostname server
+ set test_path [file dirname $install_file_path]/${hostname}-${server}-testreport.xml
return $test_path
}
@@ -1112,9 +1112,9 @@
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
+ 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 description
} {
set service($entry) "n/a"
@@ -1133,7 +1133,7 @@
if { $info_type eq "" } {
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
@@ -1204,7 +1204,7 @@
on the server.
@author Peter Marklund
-
+
} {
set xml_doc ""
@@ -1216,7 +1216,7 @@
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"
}
@@ -1270,10 +1270,10 @@
ad_proc -public aa_get_first_url {
{-package_key:required}
-} {
+} {
Procedure for geting the url of a mounted package with the
package_key. It uses the first instance that it founds. This is
- useful for tclwebtest tests.
+ useful for tclwebtest tests.
} {
set url [site_node::get_package_url -package_key $package_key]
if {$url eq ""} {
@@ -1318,7 +1318,7 @@
# request.
return $_acs_automated_testing_selenium_init
}
-
+
set server_url [parameter::get_from_package_key \
-package_key acs-automated-testing \
-parameter "SeleniumRcServer" \