Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: webkit/compositor/copyfiles.py

Issue 10874095: Add target for webkit_compositor_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix up gyp Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/compositor/compositor_tests.gyp ('k') | webkit/compositor/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import shutil 5 import shutil
6 import os 6 import os
7 import re 7 import re
8 8
9 prefixes = ["../../third_party/WebKit/Source/WebCore/platform/chromium/support", 9 prefixes = ["../../third_party/WebKit/Source/WebCore/platform/chromium/support",
10 "../../third_party/WebKit/Source/WebKit/chromium/src", 10 "../../third_party/WebKit/Source/WebKit/chromium/src",
11 "../../third_party/WebKit/Source/WebKit/chromium/tests",
11 "../../third_party/WebKit/Source/WebCore/platform"] 12 "../../third_party/WebKit/Source/WebCore/platform"]
12 13
13 def Copy(name): 14 def Copy(name):
14 src = name 15 src = name
15 dst = name 16 dst = name
16 fullsrc = "" 17 fullsrc = ""
17 for prefix in prefixes: 18 for prefix in prefixes:
18 candidate = "%s/%s" % (prefix, src) 19 candidate = "%s/%s" % (prefix, src)
19 if os.path.exists(candidate): 20 if os.path.exists(candidate):
20 fullsrc = candidate 21 fullsrc = candidate
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 assert m 54 assert m
54 year = m.group(1) 55 year = m.group(1)
55 56
56 fixed_text = FixCopyrightHeaderText(text, year) 57 fixed_text = FixCopyrightHeaderText(text, year)
57 with open(filepath, "w") as f: 58 with open(filepath, "w") as f:
58 f.write(fixed_text) 59 f.write(fixed_text)
59 60
60 def Main(): 61 def Main():
61 files = Readfile("compositor.gyp")['variables']['webkit_compositor_sources'] 62 files = Readfile("compositor.gyp")['variables']['webkit_compositor_sources']
62 for f in files: 63 for f in files:
63 dst =Copy(f) 64 dst = Copy(f)
65 FixCopyrightHeader(dst)
66
67 files = Readfile("compositor.gyp")['variables']['webkit_compositor_tests_sourc es']
68 for f in files:
69 dst = Copy(f)
64 FixCopyrightHeader(dst) 70 FixCopyrightHeader(dst)
65 71
66 if __name__ == '__main__': 72 if __name__ == '__main__':
67 import sys 73 import sys
68 os.chdir(os.path.dirname(__file__)) 74 os.chdir(os.path.dirname(__file__))
69 sys.exit(Main()) 75 sys.exit(Main())
OLDNEW
« no previous file with comments | « webkit/compositor/compositor_tests.gyp ('k') | webkit/compositor/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698