Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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()