Chromium Code Reviews| Index: scripts/slave/recipes/pdfium.py |
| diff --git a/scripts/slave/recipes/pdfium.py b/scripts/slave/recipes/pdfium.py |
| index af35adea42082dd100be47f75a897c295b5317fb..89a8b9ec014b4e93ddde03abeb3aae15fa23948e 100644 |
| --- a/scripts/slave/recipes/pdfium.py |
| +++ b/scripts/slave/recipes/pdfium.py |
| @@ -11,6 +11,11 @@ DEPS = [ |
| 'step', |
| ] |
| +from recipe_engine.recipe_api import Property |
| + |
| +PROPERTIES = { |
| + 'drmemory': Property(default=True, kind=bool), |
| +} |
| def _CheckoutSteps(api): |
| # Checkout pdfium and its dependencies (specified in DEPS) using gclient |
| @@ -29,30 +34,57 @@ def _BuildSteps(api): |
| def _RunTests(api): |
| - unittests_path = str(api.path['checkout'].join('out', 'Debug', |
| - 'pdfium_unittests')) |
| - if api.platform.is_win: |
| - unittests_path += '.exe' |
| - api.step('unittests', [unittests_path], cwd=api.path['checkout']) |
| - |
| - embeddertests_path = str(api.path['checkout'].join('out', 'Debug', |
| - 'pdfium_embeddertests')) |
| - if api.platform.is_win: |
| - embeddertests_path += '.exe' |
| - api.step('embeddertests', [embeddertests_path], |
| - cwd=api.path['checkout']) |
| - |
| - javascript_path = str(api.path['checkout'].join('testing', 'tools', |
| - 'run_javascript_tests.py')) |
| - api.python('javascript tests', javascript_path, cwd=api.path['checkout']) |
| - |
| - pixel_tests_path = str(api.path['checkout'].join('testing', 'tools', |
| - 'run_pixel_tests.py')) |
| - api.python('pixel tests', pixel_tests_path, cwd=api.path['checkout']) |
| - |
| - corpus_tests_path = str(api.path['checkout'].join('testing', 'tools', |
| - 'run_corpus_tests.py')) |
| - api.python('corpus tests', corpus_tests_path, cwd=api.path['checkout']) |
| + drmemory = api.properties.get('drmemory') |
| + pdfium_tests_py = str(api.path['checkout'].join('tools', |
| + 'drmemory', |
| + 'scripts', |
| + 'pdfium_tests.py')) |
| + if drmemory: |
| + api.python('unittests', pdfium_tests_py, |
| + args=['--test', 'pdfium_unittests'], |
| + cwd=api.path['checkout']) |
| + else: |
| + unittests_path = str(api.path['checkout'].join('out', 'Debug', |
| + 'pdfium_unittests')) |
|
Dirk Pranke
2015/11/25 03:58:05
did you lose the 'is_win' check here?
|
| + api.step('unittests', [unittests_path], cwd=api.path['checkout']) |
| + |
| + if drmemory: |
| + api.python('embeddertests', pdfium_tests_py, |
| + args=['--test', 'pdfium_embeddertests'], |
| + cwd=api.path['checkout']) |
| + else: |
| + embeddertests_path = str(api.path['checkout'].join('out', 'Debug', |
| + 'pdfium_embeddertests')) |
| + if api.platform.is_win: |
| + embeddertests_path += '.exe' |
| + api.step('embeddertests', [embeddertests_path], cwd=api.path['checkout']) |
| + |
| + if drmemory: |
| + api.python('javascript tests', pdfium_tests_py, |
| + args=['--test', 'pdfium_javascript'], |
| + cwd=api.path['checkout']) |
| + else: |
| + javascript_path = str(api.path['checkout'].join('testing', 'tools', |
| + 'run_javascript_tests.py')) |
| + api.python('javascript tests', javascript_path, cwd=api.path['checkout']) |
| + |
| + if drmemory: |
| + api.python('pixel tests', pdfium_tests_py, |
| + args=['--test', 'pdfium_pixel'], |
| + cwd=api.path['checkout']) |
| + else: |
| + pixel_tests_path = str(api.path['checkout'].join('testing', 'tools', |
| + 'run_pixel_tests.py')) |
| + api.python('pixel tests', pixel_tests_path, cwd=api.path['checkout']) |
| + |
| + if drmemory: |
| + api.python('corpus tests', pdfium_tests_py, |
| + args=['--test', 'pdfium_corpus'], |
| + cwd=api.path['checkout']) |
| + else: |
| + corpus_tests_path = str(api.path['checkout'].join('testing', 'tools', |
| + 'run_corpus_tests.py')) |
| + api.python('corpus tests', corpus_tests_path, cwd=api.path['checkout']) |
| def RunSteps(api): |
| @@ -73,3 +105,5 @@ def GenTests(api): |
| api.properties(branch='xfa')) |
| yield (api.test('mac_xfa') + api.platform('mac', 64) + |
| api.properties(branch='xfa')) |
| + yield (api.test('drm_win_xfa') + api.platform('win', 64) + |
| + api.properties(branch='xfa', drmemory=True)) |