Chromium Code Reviews| Index: chrome/test/nacl_test_injection/buildbot_nacl_integration.py |
| diff --git a/chrome/test/nacl_test_injection/buildbot_nacl_integration.py b/chrome/test/nacl_test_injection/buildbot_nacl_integration.py |
| index 19876c5a2ee17ad5cb4c5ae795e808f350b07677..0e0a012c172f032f954570d884e40a91b0290da1 100755 |
| --- a/chrome/test/nacl_test_injection/buildbot_nacl_integration.py |
| +++ b/chrome/test/nacl_test_injection/buildbot_nacl_integration.py |
| @@ -4,6 +4,7 @@ |
| # found in the LICENSE file. |
| import os |
| +import shutil |
| import subprocess |
| import sys |
| @@ -73,6 +74,90 @@ def Main(args): |
| test_dir = os.path.dirname(script_dir) |
| chrome_dir = os.path.dirname(test_dir) |
| src_dir = os.path.dirname(chrome_dir) |
| + |
| + # DO NOT COMMIT |
| + nacl_dir = os.path.join(src_dir, 'native_client') |
|
noelallen1
2012/09/07 21:50:07
Do not commit?
|
| + ppapi_nacl_dir = os.path.join(src_dir, 'ppapi', 'native_client') |
| + dont_remove = [ |
| + 'native_client/src/trusted/weak_ref/call_on_main_thread.h', |
| + ] |
| + allowed_to_vary = [ |
| + # relative path tweaks: |
| + 'native_client/src/untrusted/irt_stub/irt_stub.gyp', |
| + 'native_client/tools/browser_tester/browser_tester.py', |
| + # copyright header changes: |
| + 'native_client/tools/browser_tester/browsertester/__init__.py', |
| + 'native_client/tools/browser_tester/browsertester/rpclistener.py', |
| + # wrapped a line over 80: |
| + 'native_client/tools/browser_tester/browserdata/nacltest.js', |
| + ] |
| + nacl_browser = [] |
| + for root, dirs, files in os.walk( |
| + os.path.join(nacl_dir, 'tests', 'nacl_browser')): |
| + if '.svn' in dirs: |
| + dirs.remove('.svn') |
| + for name in files: |
| + path = os.path.join(root, name) |
| + assert path[0:len(src_dir)+1] == src_dir + os.sep |
| + nacl_browser.append(path[len(src_dir)+1:]) |
| + print 'NACL_BROWSER-----------vvvvv' |
| + for path in nacl_browser: |
| + print path |
| + print 'NACL_BROWSER-----------^^^^^' |
| + other = """\ |
| +native_client/src/include/nacl_memory.h |
| +native_client/src/trusted/weak_ref/call_on_main_thread.h |
| +native_client/src/untrusted/irt_stub/irt_stub.gyp |
| +native_client/src/untrusted/irt_stub/libppapi.a |
| +native_client/src/untrusted/irt_stub/libppapi.so |
| +native_client/src/untrusted/irt_stub/nacl.scons |
| +native_client/src/untrusted/irt_stub/plugin_main_irt.c |
| +native_client/src/untrusted/irt_stub/ppapi_plugin_main.c |
| +native_client/src/untrusted/irt_stub/ppapi_plugin_start.c |
| +native_client/src/untrusted/irt_stub/ppapi_start.h |
| +native_client/src/untrusted/irt_stub/thread_creator.c |
| +native_client/src/untrusted/irt_stub/thread_creator.h |
| +native_client/src/untrusted/nacl_ppapi_util/nacl.scons |
| +native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.cc |
| +native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h |
| +native_client/src/untrusted/nacl_ppapi_util/ppapi_srpc_main.c |
| +native_client/src/untrusted/nacl_ppapi_util/ppapi_srpc_main.h |
| +native_client/src/untrusted/nacl_ppapi_util/string_buffer.cc |
| +native_client/src/untrusted/nacl_ppapi_util/string_buffer.h |
| +native_client/src/untrusted/pnacl_irt_shim/nacl.scons |
| +native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h |
| +native_client/src/untrusted/pnacl_support_extension/nacl.scons |
| +native_client/tests/nacl.scons |
| +native_client/tools/browser_tester/browser_tester.py |
| +native_client/tools/browser_tester/browserdata/nacltest.js |
| +native_client/tools/browser_tester/browsertester/__init__.py |
| +native_client/tools/browser_tester/browsertester/browserlauncher.py |
| +native_client/tools/browser_tester/browsertester/browserprocess.py |
| +native_client/tools/browser_tester/browsertester/rpclistener.py |
| +native_client/tools/browser_tester/browsertester/server.py |
| +""".splitlines() |
| + for path in other + nacl_browser: |
| + new_path = os.path.normpath(os.path.join(src_dir, 'ppapi', path)) |
| + old_path = os.path.normpath(os.path.join(src_dir, path)) |
| + assert os.path.exists(new_path), new_path |
| + assert os.path.exists(old_path), old_path |
| + if path not in allowed_to_vary: |
| + fh = open(old_path, 'r') |
| + old_data = fh.read() |
| + fh.close() |
| + fh = open(new_path, 'r') |
| + new_data = fh.read() |
| + fh.close() |
| + assert new_data == old_data.replace( |
| + 'The Native Client Authors', |
| + 'The Chromium Authors'), new_path |
| + if path not in dont_remove: |
| + os.remove(old_path) |
| + on_windows = sys.platform == 'win32' |
| + shutil.rmtree(os.path.join(nacl_dir, 'tests', 'nacl_browser'), |
| + ignore_errors=on_windows) |
| + # DO NOT COMMIT |
| + |
| nacl_integration_script = os.path.join( |
| src_dir, 'native_client/build/buildbot_chrome_nacl_stage.py') |
| cmd = [sys.executable, |