Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jan 2003 22:55:55 -0000 1.31 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 14 Jan 2003 12:17:05 -0000 1.32 @@ -250,7 +250,7 @@ } ad_proc -private apm_load_libraries { - {-force_reload_p 0} + {-force_reload:boolean 0} {-packages {}} {-callback apm_dummy_callback} {-procs:boolean} @@ -318,35 +318,46 @@ # Release all outstanding database handles (since the file we're sourcing # might be using the ns_db database API as opposed to the new db_* API). db_release_unused_handles - apm_files_load -force_reload_p $force_reload_p -callback $callback $files + apm_files_load -force_reload=$force_reload_p -callback $callback $files } +ad_proc -public apm_load_tests_p {} { + Determine whether to load acs-automated-testing tests + for packages. + + @return 1 if tests should be loaded and 0 otherwise + + @author Peter Marklund +} { + return [apm_package_enabled_p "acs-automated-testing"] +} + ad_proc -public apm_load_package { - {-force_reload_p 0} - {-load_tests_p 0} + {-force_reload:boolean 0} + {-load_tests:boolean 0} package_key } { Load libraries and queries for the package with given key. @author Peter Marklund } { # Load *-procs.tcl and *-init.tcl files for enabled packages. - apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -procs + apm_load_libraries -force_reload=$force_reload_p -packages $package_key -procs # Load up the Queries (OpenACS, ben@mit.edu) apm_load_queries -packages $package_key # Load up the Automated Tests and associated Queries if necessary if {$load_tests_p} { - apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -test_procs + apm_load_libraries -force_reload=$force_reload_p -packages $package_key -test_procs apm_load_queries -packages $package_key -test_queries } - apm_load_libraries -packages $package_key -init + apm_load_libraries -init -packages $package_key # Load up the Automated Tests initialisation scripts is necessary if {$load_tests_p} { - apm_load_libraries -force_reload_p $force_reload_p -packages $package_key -test_init + apm_load_libraries -force_reload=$force_reload_p -packages $package_key -test_init } }