Closed Bug 621574 Opened 14 years ago Closed 12 years ago

Make nsIProcess call non-blocking

Categories

(Mozilla QA Graveyard :: Mozmill Crowd Extension, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: whimboo, Assigned: whimboo)

References

()

Details

Right now we are using a blocking call for the process invoked by nsIProcess. It has to be moved to a non-blocking call to make the UI responsive and to allow us to kill the process via the UI.
The refactoring should be finished first.
Depends on: 621208
Blocks: 621576
Blocks: 619583
Moving out to v0.2 because it involves more work as expected.
Target Milestone: 0.1 → 0.2
Blocks: 623204
No longer blocks: 564648
To get a sum-up what has to be done on this bug, I will note all the different paths below:

Environment Setup
-----------------
We have to execute a sequential list of external commands to setup the test environment on the users system. Internally we already download the test environment package and unzip it into the given folder. All steps past this one now need external commands and have to be run in the given sequential order:

* Call setup.sh/cmd to install all necessary Python modules into the test environment.
* Call run.sh/cmd to clone our mozmill-automation and mozmill-tests repositories

Only after those steps the local folder is in a state the user can execute tests.

Environment Updates
-------------------
We have to update our clones of the mozmill repositories when the extension window gets opened. Also we have to check regularly if updates for the test environment are available. If that's the case, another environment setup has to be processed.

Test Execution
--------------
Any test execution will be routed through run.sh/cmd

Now that we want to use asynchronous calls, we need a way to put those actions into states. The extension has to know in which state the test environment currently is. Further any other call will have to be suspended after the execution has been finished.

We could realize that with a state machine, and put the current state into a preference. I'm currently not sure if there is another and better way to accomplish that. I will try to find out a good solution, which can be implemented in the next days.
Ongoing work happens on the nonblocking branch of the git repository:
https://github.com/whimboo/mozmill-crowd/tree/nonblocking
Status: NEW → ASSIGNED
For reference the executeSoon method from Mochitest sounds like a good candidate to use for spawning an asynchronous call:

http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js#514
Assignee: nobody → hskupin
Blocks: 646069
No longer blocks: 623204
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/13229669
Henrik Skupin deleted the linked story in Pivotal Tracker
Now covered by https://github.com/whimboo/mozmill-crowd/issues/6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.