change runtestremote and remotereftests to generate pid file

RESOLVED FIXED

Status

Testing
New Frameworks
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: bear, Assigned: jmaher)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [android][tegra][mobile_unittests])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
If we can enable runtestsremote and remotereftests to generate a pid file for themselves, and optionally for their children, then the device prep build step can check to see if older processes are hanging around and kill them.
(Reporter)

Updated

7 years ago
Whiteboard: [android][tegra][mobile_unittests]
(Reporter)

Comment 1

7 years ago
My preference would be to add a parameter to allow the caller to specify the location and name of the pid file - this would let the build step code put it in the same area as the rest of the pid files we generate.

The the default could be the directory where the process is started for non releng environments
(Reporter)

Updated

7 years ago
Blocks: 650865
(Assignee)

Comment 2

7 years ago
Created attachment 526894 [details] [diff] [review]
add --pidfile to the cli which will create a pidfile while the harness is running (1.0)

this patch adds --pidfile to the cli.  Given a filename, this will print the pid to the given filename and will remove the file in the final cleanup step in the harness.
Assignee: nobody → jmaher
Attachment #526894 - Flags: review?(ctalbert)
Attachment #526894 - Flags: feedback?(bear)
(Reporter)

Comment 3

7 years ago
Comment on attachment 526894 [details] [diff] [review]
add --pidfile to the cli which will create a pidfile while the harness is running (1.0)

looks good.  This may be a nit, but I like to wrap the os.remove() with an except catch for OSError so you catch the odd moment when the pidfile goes away during the codes runtime.
Attachment #526894 - Flags: feedback?(bear) → feedback+
(Assignee)

Comment 4

7 years ago
Created attachment 526900 [details] [diff] [review]
add --pidfile to the cli which will create a pidfile while the harness is running (1.1)

updated with warning statement if os.remove() fails!
Attachment #526894 - Attachment is obsolete: true
Attachment #526894 - Flags: review?(ctalbert)
Attachment #526900 - Flags: review?(ctalbert)

Comment 5

7 years ago
Comment on attachment 526900 [details] [diff] [review]
add --pidfile to the cli which will create a pidfile while the harness is running (1.1)

Looks good
Attachment #526900 - Flags: review?(ctalbert) → review+

Comment 6

7 years ago
Landed: http://hg.mozilla.org/mozilla-central/rev/bad2a5a169f5
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.