Closed Bug 1240723 Opened 7 years ago Closed 7 years ago

head and tail entries mandatory for remote xpcshell tests on B2G

Categories

(Testing :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: ato, Assigned: ato)

References

Details

Attachments

(1 file)

The `head` and `tail` configuration entries on the manifest .ini file for remote xpcshell tests on B2G are mandatory:

 20:40:29     INFO -  KeyError: 'head'
 20:40:29     INFO -  Traceback (most recent call last):
 20:40:29     INFO -    File "runtestsb2g.py", line 142, in run_remote_xpcshell
 20:40:29     INFO -      **vars(options)):
 20:40:29     INFO -    File "/builds/slave/test/build/tests/xpcshell/runxpcshelltests.py", line 1436, in runTests
 20:40:29     INFO -      raise exceptions[0]
 20:40:29     INFO -  KeyError: 'head'
 20:40:29     INFO -  Automation Error: Exception caught while running tests
 20:40:34     INFO - Return code: 1

The tests run fine without these on desktop, so I’d expect them not to be mandatory.
 20:40:29     INFO -  Traceback (most recent call last):
 20:40:29     INFO -    File "/builds/slave/test/build/tests/xpcshell/runxpcshelltests.py", line 166, in run
 20:40:29     INFO -      self.run_test()
 20:40:29     INFO -    File "/builds/slave/test/build/tests/xpcshell/runxpcshelltests.py", line 622, in run_test
 20:40:29     INFO -      head_files, tail_files = self.getHeadAndTailFiles(self.test_object)
 20:40:29     INFO -    File "/builds/slave/test/build/tests/xpcshell/remotexpcshelltests.py", line 107, in getHeadAndTailFiles
 20:40:29     INFO -      return (list(sanitize_list(test['head'], 'head')),
 20:40:29     INFO -  KeyError: 'head'
As gijs pointed out, https://hg.mozilla.org/mozilla-central/rev/7f7abc547fb9 doesn’t agree with the remote version in https://dxr.mozilla.org/mozilla-central/source/testing/xpcshell/remotexpcshelltests.py#107.  We should harmonise the two to agree.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Head- and tail entries in manifest files are not mandatory on
local/desktop xpcshell tests, and they should not be on remote/B2G either.

This change makes remotexpcshelltests and runxpcshelltests agree on how
to get head- and tail files.

Review commit: https://reviewboard.mozilla.org/r/31433/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31433/
Blocks: 1240789
Attachment #8709413 - Flags: review?(ted)
Comment on attachment 8709413 [details]
MozReview Request: Bug 1240723 - Harmonise xpcshell head- and tail list computation; r?ted

https://reviewboard.mozilla.org/r/31433/#review28155

::: testing/xpcshell/remotexpcshelltests.py:94
(Diff revision 1)
> +        """

The docstring comment could be *slightly* clearer, maybe "Returns a tuple containing a list of head files and a list of tail files."

::: testing/xpcshell/remotexpcshelltests.py:96
(Diff revision 1)
> -            for f in s.strip().split(' '):
> +            for f in s.strip().split(" "):

We appear to be super inconsistent about what type of quotes to use in this file, but our unofficial style is single quotes.

::: testing/xpcshell/runxpcshelltests.py:394
(Diff revision 1)
> -        """Obtain the list of head and tail files.
> +        """Obtain lists of head- and tail files.  Returns a tuple of head-

It sure would be nice if we could make these use the same code instead of doing the exact same thing but joining the file paths with a different base path. You don't have to fix that, it just makes me sad.
Attachment #8709413 - Flags: review?(ted) → review+
https://reviewboard.mozilla.org/r/31433/#review28155

> The docstring comment could be *slightly* clearer, maybe "Returns a tuple containing a list of head files and a list of tail files."

Fixed.

> We appear to be super inconsistent about what type of quotes to use in this file, but our unofficial style is single quotes.

Fixed up both functions.

> It sure would be nice if we could make these use the same code instead of doing the exact same thing but joining the file paths with a different base path. You don't have to fix that, it just makes me sad.

Ditto.
Comment on attachment 8709413 [details]
MozReview Request: Bug 1240723 - Harmonise xpcshell head- and tail list computation; r?ted

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31433/diff/1-2/
Comment on attachment 8709413 [details]
MozReview Request: Bug 1240723 - Harmonise xpcshell head- and tail list computation; r?ted

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31433/diff/2-3/
https://hg.mozilla.org/mozilla-central/rev/31f33400c019
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.