Add support for pre-command and post-command

Bug #1354194 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Won't Fix
Wishlist
Unassigned

Bug Description

Some tests need to configure the test environment prior to performing the actual test and restore the original settings after that. To properly support interrupting tests later on we should explicitly split out those parts into dedicated command sections.

My proposal is to add two new optional fields.

pre-command:
post-command:

(alternative spelling, setup-command and teardown-command)

If those fields are specified they should be used in pairs (validate enhancement to detect that would be nice).

Before starting the test we will run the pre-command program. Now, the outcome of the test is still going to be derived from the exit code of the main command block. However, regardless of what the outcome code is we will always run post-command program.

Using those commands we can start to look at an reliable interrupt feature where we kill the main test process (or process group, more on that later in anther bug) with SIGINT, SIGQUIT and finally SIGKILL.

Zygmunt Krynicki (zyga)
Changed in plainbox:
status: New → Triaged
importance: Undecided → Wishlist
Zygmunt Krynicki (zyga)
Changed in plainbox:
status: Triaged → In Progress
milestone: none → 0.23
assignee: nobody → Zygmunt Krynicki (zyga)
Changed in plainbox:
milestone: 0.23 → 0.24
Changed in plainbox:
milestone: 0.24 → 0.25
Pierre Equoy (pieq)
Changed in plainbox:
milestone: 0.25 → 0.26
Changed in plainbox:
milestone: 0.26 → 0.27
Pierre Equoy (pieq)
Changed in plainbox:
milestone: 0.27 → 0.28
Pierre Equoy (pieq)
Changed in plainbox:
milestone: 0.28 → 0.29
Changed in plainbox:
milestone: 0.29 → none
assignee: Zygmunt Krynicki (zyga) → nobody
status: In Progress → New
Changed in plainbox:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.