Index: infra/bots/recipe_modules/flavor/pdfium_flavor.py |
diff --git a/infra/bots/recipe_modules/skia/pdfium_flavor.py b/infra/bots/recipe_modules/flavor/pdfium_flavor.py |
similarity index 78% |
rename from infra/bots/recipe_modules/skia/pdfium_flavor.py |
rename to infra/bots/recipe_modules/flavor/pdfium_flavor.py |
index 782daf0487a26d159b1f789331e8f4f486d83179..ce11aeac2ed70968e3ad470f15128bc33bc67bb9 100644 |
--- a/infra/bots/recipe_modules/skia/pdfium_flavor.py |
+++ b/infra/bots/recipe_modules/flavor/pdfium_flavor.py |
@@ -14,11 +14,11 @@ class PDFiumFlavorUtils(default_flavor.DefaultFlavorUtils): |
def compile(self, target): |
"""Build PDFium with Skia.""" |
- pdfium_dir = self._skia_api.checkout_root.join('pdfium') |
+ pdfium_dir = self.m.vars.checkout_root.join('pdfium') |
# Runhook to generate the gn binary in buildtools. |
- self._skia_api.run( |
- self._skia_api.m.step, |
+ self.m.run( |
+ self.m.step, |
'runhook', |
cmd=['gclient', 'runhook', 'gn_linux64'], |
cwd=pdfium_dir) |
@@ -26,19 +26,19 @@ class PDFiumFlavorUtils(default_flavor.DefaultFlavorUtils): |
# Setup gn args. |
gn_args = ['pdf_use_skia=true', 'pdf_is_standalone=true', |
'clang_use_chrome_plugins=false'] |
- self._skia_api.run( |
- self._skia_api.m.step, |
+ self.m.run( |
+ self.m.step, |
'gn_gen', |
cmd=['gn', 'gen', 'out/skia', '--args=%s' % ' '.join(gn_args)], |
cwd=pdfium_dir, |
env={'CHROMIUM_BUILDTOOLS_PATH': str(pdfium_dir.join('buildtools'))}) |
# Modify DEPS file to contain the current Skia revision. |
- skia_revision = self._skia_api.got_revision |
+ skia_revision = self.m.vars.got_revision |
deps_file = pdfium_dir.join('DEPS') |
test_data = "'skia_revision': 'abc'" |
- original_contents = self._skia_api.m.file.read( |
+ original_contents = self.m.file.read( |
'read PDFium DEPS', deps_file, test_data=test_data, infra_step=True) |
deps_skia_regexp = re.compile( |
@@ -46,19 +46,19 @@ class PDFiumFlavorUtils(default_flavor.DefaultFlavorUtils): |
re.MULTILINE) |
patched_contents = re.sub(deps_skia_regexp, str(skia_revision), |
original_contents) |
- self._skia_api.m.file.write('write PDFium DEPs', deps_file, |
+ self.m.file.write('write PDFium DEPs', deps_file, |
patched_contents, infra_step=True) |
# gclient sync after updating DEPS. |
- self._skia_api.run( |
- self._skia_api.m.step, |
+ self.m.run( |
+ self.m.step, |
'sync_pdfium', |
cmd=['gclient', 'sync'], |
cwd=pdfium_dir) |
# Build PDFium. |
- self._skia_api.run( |
- self._skia_api.m.step, |
+ self.m.run( |
+ self.m.step, |
'build_pdfium', |
cmd=['ninja', '-C', 'out/skia', '-j100'], |
cwd=pdfium_dir) |