Add capability to mark tests as failing in import-tests.py

RESOLVED FIXED in mozilla18

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jwir3, Assigned: jwir3)

Tracking

Trunk
mozilla18
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Our import-tests.py script imports tests from the css-wg's hg repository. Although all of the tests are imported for a given module once that module is added to the suite, not all of the tests will pass, thus turning tbpl perma-orange if they are imported into the tree.

We should add the capability for the import-tests.py script to do the following:
  - Be able to automatically mark reftests as failing based on a reftest name.

This will be controlled via a text file that will sit next to import-tests.py. This text file will essentially house a list of reftest names that will be marked in the reftest.list file as "failing".
(Assignee)

Comment 1

6 years ago
Created attachment 657320 [details] [diff] [review]
b787267
Attachment #657320 - Flags: review?(dbaron)
Comment on attachment 657320 [details] [diff] [review]
b787267

>+import sys

>+    dirname = os.path.dirname(sys.argv[0])

Use __file__ or os.path.realpath(__file__) instead of sys.argv[0].

>+    failList = [x.lstrip().rstrip() for x in failListFile if bool(x.lstrip().rstrip()) and not x.lstrip().startswith("#")]

May as well assign directly to gFailList.

Also, can you avoid calling lstrip() three times by nesting list comprehensions, e.g. something like:

gFailList = [x for x in [x.lstrip().rstrip() for x in failListFile] if bool(x) and not x.startswith("#")]

(or maybe a better way)?


r=dbaron with that or similar
Attachment #657320 - Flags: review?(dbaron) → review+
(Assignee)

Comment 3

6 years ago
Fixed issues found in review and landed on inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8e8c00e00ff
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/b8e8c00e00ff
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.