- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / nacl_test_injection / buildbot_nacl_integration.py
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5
6 import os
7 import subprocess
8 import sys
9
10
11 def Main(args):
12   pwd = os.environ.get('PWD', '')
13   is_integration_bot = 'nacl-chrome' in pwd
14
15   # This environment variable check mimics what
16   # buildbot_chrome_nacl_stage.py does.
17   is_win64 = (sys.platform in ('win32', 'cygwin') and
18               ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or
19                '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')))
20
21   # On the main Chrome waterfall, we may need to control where the tests are
22   # run.
23   # If there is serious skew in the PPAPI interface that causes all of
24   # the NaCl integration tests to fail, you can uncomment the
25   # following block.  (Make sure you comment it out when the issues
26   # are resolved.)  *However*, it is much preferred to add tests to
27   # the 'tests_to_disable' list below.
28   #if not is_integration_bot:
29   #  return
30
31   tests_to_disable = []
32
33   # In general, you should disable tests inside this conditional.  This turns
34   # them off on the main Chrome waterfall, but not on NaCl's integration bots.
35   # This makes it easier to see when things have been fixed NaCl side.
36   if not is_integration_bot:
37     # http://code.google.com/p/nativeclient/issues/detail?id=2511
38     tests_to_disable.append('run_ppapi_ppb_image_data_browser_test')
39
40     if sys.platform == 'darwin':
41       # TODO(mseaborn) fix
42       # http://code.google.com/p/nativeclient/issues/detail?id=1835
43       tests_to_disable.append('run_ppapi_crash_browser_test')
44
45     if sys.platform in ('win32', 'cygwin'):
46       # This one is only failing for nacl_glibc on x64 Windows
47       # but it is not clear how to disable only that limited case.
48       # See http://crbug.com/132395
49       tests_to_disable.append('run_inbrowser_test_runner')
50
51   script_dir = os.path.dirname(os.path.abspath(__file__))
52   nacl_integration_script = os.path.join(script_dir,
53                                          'buildbot_chrome_nacl_stage.py')
54   cmd = [sys.executable,
55          nacl_integration_script,
56          # TODO(ncbray) re-enable.
57          # https://code.google.com/p/chromium/issues/detail?id=133568
58          '--disable_glibc',
59          '--disable_tests=%s' % ','.join(tests_to_disable)]
60   cmd += args
61   sys.stdout.write('Running %s\n' % ' '.join(cmd))
62   sys.stdout.flush()
63   return subprocess.call(cmd)
64
65
66 if __name__ == '__main__':
67   sys.exit(Main(sys.argv[1:]))