content/canvas/test/webgl-conformance/writemanifest.py

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 #!/usr/bin/env python
     2 #
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this
     5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6 #
     7 # Write a Mochitest manifest for WebGL conformance test files.
     9 import os
    10 from itertools import chain
    12 CONFORMANCE_DIRS = [
    13     "conformance",
    14     "resources",
    15 ]
    17 def listfiles(dir, rel):
    18     """List all files in dir recursively, yielding paths
    19     relative to rel.
    20     """
    21     for root, folders, files in os.walk(dir):
    22         for f in files:
    23             yield os.path.relpath(os.path.join(root, f), rel)
    25 def writemanifest():
    26     script_dir = os.path.dirname(__file__)
    27     list_dirs = [os.path.join(script_dir, d) for d in CONFORMANCE_DIRS]
    28     with open(os.path.join(script_dir, 'mochitest-conformance-files.ini'), 'w') as f:
    29         f.write("""[DEFAULT]
    30 support-files =
    31   %s
    32 """ % "\n  ".join(sorted(chain.from_iterable(listfiles(d, script_dir)
    33                                              for d in list_dirs))))
    35 if __name__ == '__main__':
    36     writemanifest()

mercurial