Chromium Code Reviews| Index: tools/testing/perf_testing/run_perf_tests.py |
| =================================================================== |
| --- tools/testing/perf_testing/run_perf_tests.py (revision 10929) |
| +++ tools/testing/perf_testing/run_perf_tests.py (working copy) |
| @@ -26,6 +26,8 @@ |
| '..', '..', '..', |
| 'dart_checkout_for_perf_testing', |
| 'dart')) |
| +# The earliest stored version of Dartium. Don't try to test earlier than this. |
| +EARLIEST_REVISION = 4285 |
| sys.path.append(TOOLS_PATH) |
| sys.path.append(os.path.join(TOP_LEVEL_DIR, 'internal', 'tests')) |
| import post_results |
| @@ -344,6 +346,17 @@ |
| """Check whether data should be captured for this platform/variant |
| combination. |
| """ |
| + # TODO(vsm): This avoids a bug in 32-bit Chrome (dartium) |
| + # running JS dromaeo. |
| + if platform == 'dartium' and variant == 'js': |
| + return False |
| + if platform == 'safari' and variant == 'dart2js' and \ |
|
sra1
2012/08/18 02:59:02
Preferred Python style is to use parentheses to ma
|
| + int(self.test_runner.current_revision_num) < 10193: |
| + # In revision 10193 we fixed a bug that allows Safari 6 to run dart2js |
| + # code. Since we can't change the Safari version on the machine, we're |
| + # just not running |
| + # for this case. |
| + return False |
| return True |
| def run(self): |
| @@ -712,17 +725,6 @@ |
| def name(): |
| return 'dromaeo' |
| - def is_valid_combination(self, browser, version): |
| - # TODO(vsm): This avoids a bug in 32-bit Chrome (dartium) |
| - # running JS dromaeo. |
| - if browser == 'dartium' and version == 'js': |
| - return False |
| - # dart:dom has been removed from Dartium. |
| - if browser == 'dartium' and 'dom' in version: |
| - return False |
| - return True |
| - |
| - |
| class DromaeoPerfTester(DromaeoTester): |
| def move_chrome_driver_if_needed(self, browser): |
| """Move the appropriate version of ChromeDriver onto the path. |
| @@ -769,14 +771,21 @@ |
| if os.path.exists(orig_chromedriver_path): |
| move_chromedriver(loc) |
| elif browser == 'dartium': |
| - if not os.path.exists(dartium_chromedriver_path): |
| + if self.test.test_runner.current_revision_num < 7823: |
| + # 7823 is the first recorded version we have of a different |
| + # chromedriver. If before that, just use the regular chromedriver. |
| + self.test.test_runner.run_cmd(os.path.join( |
| + TOP_LEVEL_DIR, 'tools', 'testing', 'webdriver_test_setup.py'), |
| + '-f', '-s', '-p') |
| + elif not os.path.exists(dartium_chromedriver_path): |
| self.test.test_runner.get_archive('chromedriver') |
| # Move original chromedriver for storage. |
| if not os.path.exists(orig_chromedriver_path): |
| move_chromedriver(loc, copy_to_depot_tools_dir=False) |
| - # Copy Dartium chromedriver into depot_tools |
| - move_chromedriver(loc, from_path=os.path.join( |
| - dartium_chromedriver_path, 'chromedriver')) |
| + if self.test.test_runner.current_revision_num >= 7823: |
|
sra1
2012/08/18 02:59:02
Since you mention 7823 twice, make it a constant,
|
| + # Copy Dartium chromedriver into depot_tools |
| + move_chromedriver(loc, from_path=os.path.join( |
| + dartium_chromedriver_path, 'chromedriver')) |
| os.chdir(current_dir) |
| def run_tests(self): |
| @@ -978,7 +987,8 @@ |
| tries = 0 |
| # Select which "thousands bucket" we're going to run additional tests for. |
| bucket_size = 1000 |
| - thousands_list = range(1, int(revision_num)/bucket_size + 1) |
| + thousands_list = range(EARLIEST_REVISION/bucket_size, |
| + int(revision_num)/bucket_size + 1) |
| weighted_total = sum(thousands_list) |
| generated_random_number = random.randint(0, weighted_total - 1) |
| for i in list(reversed(thousands_list)): |
| @@ -1002,7 +1012,7 @@ |
| # CL that does not yet have 10 runs. But only perform a set of extra |
| # runs at most 2 at a time before checking to see if new code has been |
| # checked in. |
| - while revision_num > 0 and not has_run_extra: |
| + while revision_num > EARLIEST_REVISION and not has_run_extra: |
| if revision_num not in results_set: |
| has_run_extra = try_to_run_additional(revision_num) |
| revision_num -= 1 |