Closed Bug 938982 Opened 11 years ago Closed 6 years ago

Stop function in marionette test runner

Categories

(Remote Protocol :: Marionette, defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pyang, Unassigned)

Details

(Keywords: pi-marionette-runner)

There is a stopTest function in MarionetteTestResult, however user might have only instance of MarionetteTestRunner, can we create a function in runner to stop tests and do cleanups?
If I understand correctly, we can add a check in run_tests ( http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runtests.py#527 ) that will check if the user set a flag to stop running the tests, but I'm not sure I understand the us e case for this. Can you explain how you would use this with an example?
Sorry for late reply...
For MTBF, we need to stop the runner after it run for a specific period, such like 10 hours.
Currently our solution is to use system warn signal for timer, raise exception to stop the runner and collect test result; look more like a hack rather than a clean solution.
Whiteboard: [u=marionette-user c=marionette-python p=2]
Whiteboard: [u=marionette-user c=marionette-python p=2] → [u=marionette-user c=marionette-python p=2][runner]
Is this still required?
Flags: needinfo?(pyang)
Whiteboard: [u=marionette-user c=marionette-python p=2][runner]
I guess we can modify title to need api to gracefully shut down or stop/pause tests.
in python unittest, result.stopTest seems to skip specific test instead of stop them all.
Which I think following code doesn't seems to work.
http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py#199

We now try to set shouldStop = True, is it the right way or should we create stop in runner, since result.stop() not sound literally well.
Flags: needinfo?(pyang)
[mass update] Setting Harness bugs to all P3
Priority: -- → P3
We probably will not add an API to gracefully stop tests mid-execution.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.