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.27 -r1.28
--- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 15 Feb 2004 12:25:01 -0000 1.27
+++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 16 Feb 2004 16:47:25 -0000 1.28
@@ -25,6 +25,7 @@
nsv_set aa_test components {}
nsv_set aa_test init_classes {}
nsv_set aa_test categories { config db api web smoke stress security_risk populator production_safe }
+ nsv_set aa_test exclusion_categories { stress security_risk }
}
ad_proc -public aa_stub {
@@ -293,15 +294,15 @@
@param libraries A list of keywords of additional code modules to load. The entire test case will fail if any package is missing. Currently includes tclwebtest.
@param cats Properties of the test case. Must be zero or more of the following:
-
-- db: Tests the database directly
-
- api: tests the TCL API
-
- web: tests HTTP interface
-
- smoke: Minimal test to assure functionality and catch basic errors.
-
- stress: Puts heavy load on server or creates large numbers of records. Intended to simulate maximal production load.
-
- security_risk: May introduce a security risk.
-
- populator: Creates and leaves sample data.
-
- production_safe: Can be run without the risk of adding or deleting data.
+
+ - db: Tests the database directly
+
- api: tests the TCL API
+
- web: tests HTTP interface
+
- smoke: Minimal test to assure functionality and catch basic errors.
+
- stress: Puts heavy load on server or creates large numbers of records. Intended to simulate maximal production load.
+
- security_risk: May introduce a security risk.
+
- populator: Creates sample data for future use.
+
- production_safe: Can be used on a live production site, ie for sanity checking or keepalive purposes. Implies: no risk of adding or deleting data; no risk of crashing; minimal cpu/db/net load.
@param error_level Force all test failures to this error level. One of
@@ -490,6 +491,8 @@
}
ad_proc -public aa_runseries {
+ {-stress 0}
+ {-security_risk 0}
-quiet:boolean
{-testcase_id ""}
by_package_key
@@ -530,13 +533,34 @@
set package_key [lindex $testcase 3]
set categories [lindex $testcase 4]
set init_classes [lindex $testcase 5]
- if {($by_package_key == "" || ($by_package_key == $package_key)) && \
- ($by_category == "" || ([lsearch $categories $by_category] != -1))} {
- lappend testcase_ids $testcase_id
- foreach init_class $init_classes {
- set classes([list $package_key $init_class]) 1
- }
+
+ # try to disqualify the test case
+
+ # if category is specified,
+ if { [exists_and_not_null by_package_key] && $by_package_key != $package_key } {
+ continue
}
+
+ # is it the wrong category?
+ if { [exists_and_not_null by_category] && [lsearch $categories $by_category] < 0 } {
+ continue
+ }
+
+ # if we don't want stress, then the test must not be stress
+ if { ! $stress && [lsearch $categories "stress"] >= 0 } {
+ continue
+ }
+
+ # if we don't want security risks, then the test must not be stress
+ if { ! $security_risk && [lsearch $categories "security_risk"] >= 0 } {
+ continue
+ }
+
+ # we made it through the filters, so add the test case
+ lappend testcase_ids $testcase_id
+ foreach init_class $init_classes {
+ set classes([list $package_key $init_class]) 1
+ }
}
}
#
@@ -1044,12 +1068,3 @@
set service(rebuild_cmd) "sh [file join $service(script_path) recreate.sh]"
}
-
-
-
-
-
-
-
-
-
\ No newline at end of file