Opened 13 years ago

Last modified 11 years ago

#1213 new defect

IZ272: Need hooks for every phase of a test lifecycle

Reported by: rhierlmeier Owned by:
Priority: high Milestone:
Component: testsuite Version: current
Severity: Keywords: Sun framework


[Imported from gridengine issuezilla]

        Issue #:      272             Platform:     Sun           Reporter: rhierlmeier (rhierlmeier)
       Component:     testsuite          OS:        All
     Subcomponent:    framework       Version:      current          CC:    None defined
        Status:       NEW             Priority:     P2
      Resolution:                    Issue type:    DEFECT
                                  Target milestone: milestone 1
      Assigned to:    crei (crei)
      QA Contact:     joga
       * Summary:     Need hooks for every phase of a test lifecycle
   Status whiteboard:

     Issue 272 blocks:
   Votes for issue 272:     Vote for this issue

   Opened: Thu Dec 11 02:40:00 -0700 2008 

In the current version of testsuite we have defined one hook which is called
before a test in a run_level is started. The same hook is called after the
run_level is finished.

The current algorithm calls the following methods:

  -> setup
  -> check_setup_level_hook
  -> setup_level
  -> run_check
  -> cleanup_level
  -> check_setup_level_hook
  -> cleanup

The Hedeby checktree uses this hook to perform checks that the test did not
pollute the system. It also collects the log files of the system in this
hook if an error occurred.
We would like to have additional checks in different phases of a test run,
however this is with the current hooks not possible.

The following model is needed

  -> pre_setup_hook
  -> setup
  -> pre_level_hook
  -> check_setup_level
  -> pre_run_hook
  -> run_check
  -> post_run_hook
  -> cleanup_level
  -> post_level_hook
  -> clean
  -> post_cleanup_hook

The hooks should have the following signature:

proc <pre_setup_hook>  { check_name }
proc <pre_setup_level> [ check_name run_level ]
proc <pre_run_hook> { check_name run_level }
proc <post_run_hook> { check_name run_level produced_error }
proc <post_level_hook> { check_name run_level produced_error }
proc <post_cleanup_hook> [ check_name succeeded_run_levels produced_error}


check_name      contains the name of the test
run_level       contains the run level of the test
produced_error  boolean value, set to true if an error occurred
succeeded_run_levels list of run_levels which has been successfully exectued

The hooks should be defined in the checktree.tcl file of the additional
checktree. Here
is an example for the definition

set ts_checktree($checktree_nr,pre_setup_hook)       "hedeby_pre_setup"

set ts_checktree($checktree_nr,pre_setup_level_hook) "hedeby_pre_setup_level"

set ts_checktree($checktree_nr,pre_run_hook)         "hedeby_pre_run"
set ts_checktree($checktree_nr,post_level_hook)      "hedeby_post_level"
set ts_checktree($checktree_nr,post_cleanup_hook)    "hedeby_post_run"

Change History (0)

Note: See TracTickets for help on using tickets.