mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
1fd0e9d9bd
Now that we've established a slightly better Python reftest manifest parser, switch the existing manifest parsing code in print-manifest-dirs.py to use it. --HG-- extra : rebase_source : 9559eb5aa47d08b9854a27ed012f2a795abc67f7 extra : histedit_source : 7a9a8942f9310c079a5ea4321a7f4f2ad17008d1
30 lines
951 B
Python
30 lines
951 B
Python
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
import os
|
|
import sys
|
|
from reftest import ReftestManifest
|
|
|
|
def printTestDirs(topsrcdir, topmanifests):
|
|
"""Parse |topmanifests| and print a list of directories containing the tests
|
|
within (and the manifests including those tests), relative to |topsrcdir|.
|
|
"""
|
|
topsrcdir = os.path.abspath(topsrcdir)
|
|
dirs = set()
|
|
for path in topmanifests:
|
|
m = ReftestManifest()
|
|
m.load(path)
|
|
dirs |= m.dirs
|
|
|
|
for d in sorted(dirs):
|
|
d = d[len(topsrcdir):].replace('\\', '/').lstrip('/')
|
|
print(d)
|
|
|
|
if __name__ == '__main__':
|
|
if len(sys.argv) < 3:
|
|
print >>sys.stderr, "Usage: %s topsrcdir reftest.list [reftest.list]*" % sys.argv[0]
|
|
sys.exit(1)
|
|
printTestDirs(sys.argv[1], sys.argv[2:])
|