| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 # chrome_tests.py | 6 # chrome_tests.py |
| 7 | 7 |
| 8 ''' Runs various chrome tests through valgrind_test.py. | 8 ''' Runs various chrome tests through valgrind_test.py. |
| 9 | 9 |
| 10 This file is a copy of ../purify/chrome_tests.py. Eventually, it would be nice | 10 This file is a copy of ../purify/chrome_tests.py. Eventually, it would be nice |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 self._data_dirs = [google.path_utils.ScriptDir()] | 85 self._data_dirs = [google.path_utils.ScriptDir()] |
| 86 | 86 |
| 87 if module == "chrome": | 87 if module == "chrome": |
| 88 # unfortunately, not all modules have the same directory structure | 88 # unfortunately, not all modules have the same directory structure |
| 89 self._data_dirs.append(os.path.join(module_dir, "test", "data", | 89 self._data_dirs.append(os.path.join(module_dir, "test", "data", |
| 90 "valgrind")) | 90 "valgrind")) |
| 91 else: | 91 else: |
| 92 self._data_dirs.append(os.path.join(module_dir, "data", "valgrind")) | 92 self._data_dirs.append(os.path.join(module_dir, "data", "valgrind")) |
| 93 | 93 |
| 94 if not self._options.build_dir: | 94 if not self._options.build_dir: |
| 95 dir_chrome = os.path.join(self._source_dir, "chrome", "Hammer") | 95 dir_chrome = os.path.join(self._source_dir, "sconsbuild", "Debug") |
| 96 dir_module = os.path.join(module_dir, "Hammer") | 96 dir_module = os.path.join(module_dir, "Debug") |
| 97 if exe: | 97 if exe: |
| 98 exe_chrome = os.path.join(dir_chrome, exe) | 98 exe_chrome = os.path.join(dir_chrome, exe) |
| 99 exe_module = os.path.join(dir_module, exe) | 99 exe_module = os.path.join(dir_module, exe) |
| 100 if os.path.isfile(exe_chrome) and not os.path.isfile(exe_module): | 100 if os.path.isfile(exe_chrome) and not os.path.isfile(exe_module): |
| 101 self._options.build_dir = dir_chrome | 101 self._options.build_dir = dir_chrome |
| 102 elif os.path.isfile(exe_module) and not os.path.isfile(exe_chrome): | 102 elif os.path.isfile(exe_module) and not os.path.isfile(exe_chrome): |
| 103 self._options.build_dir = dir_module | 103 self._options.build_dir = dir_module |
| 104 elif (os.stat(exe_module)[stat.ST_MTIME] > | 104 elif (os.stat(exe_module)[stat.ST_MTIME] > |
| 105 os.stat(exe_chrome)[stat.ST_MTIME]): | 105 os.stat(exe_chrome)[stat.ST_MTIME]): |
| 106 self._options.build_dir = dir_module | 106 self._options.build_dir = dir_module |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 for t in options.test: | 349 for t in options.test: |
| 350 tests = ChromeTests(options, args, t) | 350 tests = ChromeTests(options, args, t) |
| 351 ret = tests.Run() | 351 ret = tests.Run() |
| 352 if ret: return ret | 352 if ret: return ret |
| 353 return 0 | 353 return 0 |
| 354 | 354 |
| 355 | 355 |
| 356 if __name__ == "__main__": | 356 if __name__ == "__main__": |
| 357 ret = _main(sys.argv) | 357 ret = _main(sys.argv) |
| 358 sys.exit(ret) | 358 sys.exit(ret) |
| OLD | NEW |