Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]


A.16 SOFTWARE-EVOLUTION-LIBRARY/COMPONENTS/TEST-SUITE

Variable: *process-sleep-interval* [sel/cp/test-suite]

Frequency (in seconds) at which to check if a process has completed.

Generic Function: finish-test [sel/cp/test-suite] test-process

Ensure that test-process either runs to completion or is killed. Return the standard output, error output, and process exit code as strings.

* test-process the ‘process’ associated with the test case.

Method: finish-test [sel/cp/test-suite] test-process

Ensure that test-process either runs to completion or is killed. Return the standard output, error output, and process exit code as strings.

* test-process the ‘process-info’ object returned by ‘launch-program’ associated with the test case.

See also ‘*process-sleep-interval*’ and ‘*process-kill-timeout*’. If test-process is still running when ‘finish-test’ is called, and if ‘*process-kill-timeout*’ is bound to a non-nil value greater than 0, alternate between sleeping for ‘*process-sleep-interval*’ seconds and checking again until either ‘*process-kill-timeout*’ seconds have elapsed or the process completes. After the timeout, send a sigterm signal if test-process is still running, sleep for ‘*process-sleep-interval*’ seconds once more and then if the process is still running, send a sigkill signal.

Generic Function: run-test [sel/cp/test-suite] phenome test-case &rest extra-keys &key &allow-other-keys

Run test-case on phenome and return the results. Return the standard output, error output, and process exit code as strings.

Method: run-test [sel/cp/test-suite] phenome (test-case test-case) &rest extra-keys &key &allow-other-keys

Run test-case on phenome and return the results. Return three values: output printed to standard out, error output, and exit status. Th default behavior is simply to run ‘start-test’ and ‘finish-test’.

Generic Function: start-test [sel/cp/test-suite] phenome test-case &rest extra-keys &key &allow-other-keys

Start an external process to run test-case on phenome. Return the ‘process’.

Method: start-test [sel/cp/test-suite] phenome (test-case test-case) &rest extra-keys &key &allow-other-keys

Start an external process to run test-case on phenome. Return the ‘process’. This is a wrapper around ‘uiop:launch-program’, and any extra-keys will be passed through to that method.

Some extra-keys that may be useful are:

Class: test-case [sel/cp/test-suite]

Class precedence list: test-case, standard-object, slot-object, t

Slots:

Test case object.

Class: test-suite [sel/cp/test-suite]

Class precedence list: test-suite, oid-object, standard-object, slot-object, t

Slots:

A suite of unit tests.

Variable: *process-kill-timeout* [sel/cp/test-suite]

Optional timeout (in seconds) before killing a process


Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]