| OLD | NEW |
| 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 ''' Runs various chrome tests through heapcheck_test.py. | 6 ''' Runs various chrome tests through heapcheck_test.py. |
| 7 | 7 |
| 8 Most of this code is copied from ../valgrind/chrome_tests.py. | 8 Most of this code is copied from ../valgrind/chrome_tests.py. |
| 9 TODO(glider): put common functions to a standalone module. | 9 TODO(glider): put common functions to a standalone module. |
| 10 ''' | 10 ''' |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 return newest_dir | 71 return newest_dir |
| 72 | 72 |
| 73 class ChromeTests(object): | 73 class ChromeTests(object): |
| 74 '''This class is derived from the chrome_tests.py file in ../purify/. | 74 '''This class is derived from the chrome_tests.py file in ../purify/. |
| 75 ''' | 75 ''' |
| 76 | 76 |
| 77 def __init__(self, options, args, test): | 77 def __init__(self, options, args, test): |
| 78 # The known list of tests. | 78 # The known list of tests. |
| 79 # Recognise the original abbreviations as well as full executable names. | 79 # Recognise the original abbreviations as well as full executable names. |
| 80 self._test_list = { | 80 self._test_list = { |
| 81 "ash": self.TestAsh, "aura_shell_unittests": self.TestAsh, | 81 "ash": self.TestAsh, "ash_unittests": self.TestAsh, |
| 82 "aura": self.TestAura, "aura_unittests": self.TestAura, | 82 "aura": self.TestAura, "aura_unittests": self.TestAura, |
| 83 "base": self.TestBase, "base_unittests": self.TestBase, | 83 "base": self.TestBase, "base_unittests": self.TestBase, |
| 84 "browser": self.TestBrowser, "browser_tests": self.TestBrowser, | 84 "browser": self.TestBrowser, "browser_tests": self.TestBrowser, |
| 85 "crypto": self.TestCrypto, "crypto_unittests": self.TestCrypto, | 85 "crypto": self.TestCrypto, "crypto_unittests": self.TestCrypto, |
| 86 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, | 86 "googleurl": self.TestGURL, "googleurl_unittests": self.TestGURL, |
| 87 "content": self.TestContent, "content_unittests": self.TestContent, | 87 "content": self.TestContent, "content_unittests": self.TestContent, |
| 88 "courgette": self.TestCourgette, | 88 "courgette": self.TestCourgette, |
| 89 "courgette_unittests": self.TestCourgette, | 89 "courgette_unittests": self.TestCourgette, |
| 90 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, | 90 "ipc": self.TestIpc, "ipc_tests": self.TestIpc, |
| 91 "layout": self.TestLayout, "layout_tests": self.TestLayout, | 91 "layout": self.TestLayout, "layout_tests": self.TestLayout, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 # Sets LD_LIBRARY_PATH to the build folder so external libraries can be | 237 # Sets LD_LIBRARY_PATH to the build folder so external libraries can be |
| 238 # loaded. | 238 # loaded. |
| 239 if (os.getenv("LD_LIBRARY_PATH")): | 239 if (os.getenv("LD_LIBRARY_PATH")): |
| 240 os.putenv("LD_LIBRARY_PATH", "%s:%s" % (os.getenv("LD_LIBRARY_PATH"), | 240 os.putenv("LD_LIBRARY_PATH", "%s:%s" % (os.getenv("LD_LIBRARY_PATH"), |
| 241 self._options.build_dir)) | 241 self._options.build_dir)) |
| 242 else: | 242 else: |
| 243 os.putenv("LD_LIBRARY_PATH", self._options.build_dir) | 243 os.putenv("LD_LIBRARY_PATH", self._options.build_dir) |
| 244 return heapcheck_test.RunTool(cmd, supp, module) | 244 return heapcheck_test.RunTool(cmd, supp, module) |
| 245 | 245 |
| 246 def TestAsh(self): | 246 def TestAsh(self): |
| 247 return self.SimpleTest("ash", "aura_shell_unittests") | 247 return self.SimpleTest("ash", "ash_unittests") |
| 248 | 248 |
| 249 def TestAura(self): | 249 def TestAura(self): |
| 250 return self.SimpleTest("aura", "aura_unittests") | 250 return self.SimpleTest("aura", "aura_unittests") |
| 251 | 251 |
| 252 def TestBase(self): | 252 def TestBase(self): |
| 253 return self.SimpleTest("base", "base_unittests") | 253 return self.SimpleTest("base", "base_unittests") |
| 254 | 254 |
| 255 def TestBrowser(self): | 255 def TestBrowser(self): |
| 256 return self.SimpleTest("chrome", "browser_tests") | 256 return self.SimpleTest("chrome", "browser_tests") |
| 257 | 257 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 for t in options.test: | 459 for t in options.test: |
| 460 tests = ChromeTests(options, args, t) | 460 tests = ChromeTests(options, args, t) |
| 461 ret = tests.Run() | 461 ret = tests.Run() |
| 462 if ret: | 462 if ret: |
| 463 return ret | 463 return ret |
| 464 return 0 | 464 return 0 |
| 465 | 465 |
| 466 | 466 |
| 467 if __name__ == "__main__": | 467 if __name__ == "__main__": |
| 468 sys.exit(main()) | 468 sys.exit(main()) |
| OLD | NEW |