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

Side by Side Diff: chrome/test/nacl_test_injection/buildbot_nacl_integration.py

Issue 10914053: Relocating files in the nacl repo that belong in chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and fix windows 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import shutil
7 import subprocess 8 import subprocess
8 import sys 9 import sys
9 10
10 11
11 def Main(args): 12 def Main(args):
12 pwd = os.environ.get('PWD', '') 13 pwd = os.environ.get('PWD', '')
13 is_integration_bot = 'nacl-chrome' in pwd 14 is_integration_bot = 'nacl-chrome' in pwd
14 15
15 # This environment variable check mimics what 16 # This environment variable check mimics what
16 # buildbot_chrome_nacl_stage.py does. 17 # buildbot_chrome_nacl_stage.py does.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 # See http://crbug.com/132395 67 # See http://crbug.com/132395
67 tests_to_disable.append('run_inbrowser_test_runner') 68 tests_to_disable.append('run_inbrowser_test_runner')
68 69
69 if sys.platform in ('win32', 'cygwin'): 70 if sys.platform in ('win32', 'cygwin'):
70 tests_to_disable.append('run_ppapi_ppp_input_event_browser_test') 71 tests_to_disable.append('run_ppapi_ppp_input_event_browser_test')
71 72
72 script_dir = os.path.dirname(os.path.abspath(__file__)) 73 script_dir = os.path.dirname(os.path.abspath(__file__))
73 test_dir = os.path.dirname(script_dir) 74 test_dir = os.path.dirname(script_dir)
74 chrome_dir = os.path.dirname(test_dir) 75 chrome_dir = os.path.dirname(test_dir)
75 src_dir = os.path.dirname(chrome_dir) 76 src_dir = os.path.dirname(chrome_dir)
77
78 # DO NOT COMMIT
79 nacl_dir = os.path.join(src_dir, 'native_client')
80 ppapi_nacl_dir = os.path.join(src_dir, 'ppapi', 'native_client')
81 dont_remove = [
82 'native_client/src/trusted/weak_ref/call_on_main_thread.h',
83 ]
84 allowed_to_vary = [
85 # relative path tweaks:
86 'native_client/src/untrusted/irt_stub/irt_stub.gyp',
87 'native_client/tools/browser_tester/browser_tester.py',
88 # copyright header changes:
89 'native_client/tools/browser_tester/browsertester/__init__.py',
90 'native_client/tools/browser_tester/browsertester/rpclistener.py',
91 # wrapped a line over 80:
92 'native_client/tools/browser_tester/browserdata/nacltest.js',
93 ]
94 nacl_browser = []
95 for root, dirs, files in os.walk(
96 os.path.join(nacl_dir, 'tests', 'nacl_browser')):
97 if '.svn' in dirs:
98 dirs.remove('.svn')
99 for name in files:
100 path = os.path.join(root, name)
101 assert path[0:len(src_dir)+1] == src_dir + os.sep
102 nacl_browser.append(path[len(src_dir)+1:])
103 print 'NACL_BROWSER-----------vvvvv'
104 for path in nacl_browser:
105 print path
106 print 'NACL_BROWSER-----------^^^^^'
107 other = """\
108 native_client/src/include/nacl_memory.h
109 native_client/src/trusted/weak_ref/call_on_main_thread.h
110 native_client/src/untrusted/irt_stub/irt_stub.gyp
111 native_client/src/untrusted/irt_stub/libppapi.a
112 native_client/src/untrusted/irt_stub/libppapi.so
113 native_client/src/untrusted/irt_stub/nacl.scons
114 native_client/src/untrusted/irt_stub/plugin_main_irt.c
115 native_client/src/untrusted/irt_stub/ppapi_plugin_main.c
116 native_client/src/untrusted/irt_stub/ppapi_plugin_start.c
117 native_client/src/untrusted/irt_stub/ppapi_start.h
118 native_client/src/untrusted/irt_stub/thread_creator.c
119 native_client/src/untrusted/irt_stub/thread_creator.h
120 native_client/src/untrusted/nacl_ppapi_util/nacl.scons
121 native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.cc
122 native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h
123 native_client/src/untrusted/nacl_ppapi_util/ppapi_srpc_main.c
124 native_client/src/untrusted/nacl_ppapi_util/ppapi_srpc_main.h
125 native_client/src/untrusted/nacl_ppapi_util/string_buffer.cc
126 native_client/src/untrusted/nacl_ppapi_util/string_buffer.h
127 native_client/src/untrusted/pnacl_irt_shim/nacl.scons
128 native_client/src/untrusted/pnacl_irt_shim/shim_entry.c
129 native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c
130 native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h
131 native_client/src/untrusted/pnacl_support_extension/nacl.scons
132 native_client/tests/examples.html
133 native_client/tests/nacl.scons
134 native_client/tools/browser_tester/browser_tester.py
135 native_client/tools/browser_tester/browserdata/nacltest.js
136 native_client/tools/browser_tester/browsertester/__init__.py
137 native_client/tools/browser_tester/browsertester/browserlauncher.py
138 native_client/tools/browser_tester/browsertester/browserprocess.py
139 native_client/tools/browser_tester/browsertester/rpclistener.py
140 native_client/tools/browser_tester/browsertester/server.py
141 """.splitlines()
142 for path in other + nacl_browser:
143 new_path = os.path.normpath(os.path.join(src_dir, 'ppapi', path))
144 old_path = os.path.normpath(os.path.join(src_dir, path))
145 assert os.path.exists(new_path), new_path
146 assert os.path.exists(old_path), old_path
147 if path not in allowed_to_vary:
148 fh = open(old_path, 'rb')
149 old_data = fh.read()
150 fh.close()
151 fh = open(new_path, 'rb')
152 new_data = fh.read()
153 fh.close()
154 assert new_data == old_data.replace(
155 'The Native Client Authors',
156 'The Chromium Authors'), new_path
157 if path not in dont_remove:
158 os.remove(old_path)
159 shutil.rmtree(os.path.join(nacl_dir, 'tests', 'nacl_browser'))
Nick Bray 2012/09/06 17:11:58 Don't forget: DO NOT COMMIT. This makes it hard t
bradn 2012/09/06 18:53:16 :-)
160 # DO NOT COMMIT
161
76 nacl_integration_script = os.path.join( 162 nacl_integration_script = os.path.join(
77 src_dir, 'native_client/build/buildbot_chrome_nacl_stage.py') 163 src_dir, 'native_client/build/buildbot_chrome_nacl_stage.py')
78 cmd = [sys.executable, 164 cmd = [sys.executable,
79 '/b/build/scripts/slave/runtest.py', 165 '/b/build/scripts/slave/runtest.py',
80 '--run-python-script', 166 '--run-python-script',
81 '--target=', 167 '--target=',
82 '--build-dir=', 168 '--build-dir=',
83 '--', 169 '--',
84 nacl_integration_script, 170 nacl_integration_script,
85 # TODO(ncbray) re-enable. 171 # TODO(ncbray) re-enable.
86 # https://code.google.com/p/chromium/issues/detail?id=133568 172 # https://code.google.com/p/chromium/issues/detail?id=133568
87 '--disable_glibc', 173 '--disable_glibc',
88 '--disable_tests=%s' % ','.join(tests_to_disable)] 174 '--disable_tests=%s' % ','.join(tests_to_disable)]
89 cmd += args 175 cmd += args
90 sys.stdout.write('Running %s\n' % ' '.join(cmd)) 176 sys.stdout.write('Running %s\n' % ' '.join(cmd))
91 sys.stdout.flush() 177 sys.stdout.flush()
92 return subprocess.call(cmd) 178 return subprocess.call(cmd)
93 179
94 180
95 if __name__ == '__main__': 181 if __name__ == '__main__':
96 sys.exit(Main(sys.argv[1:])) 182 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « DEPS ('k') | ppapi/native_client/DEPS » ('j') | ppapi/native_client/native_client.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698