Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: infra/bots/recipe_modules/flavor/gn_flavor.py

Issue 2198173002: Re-organize Skia recipes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix missing dependency Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/recipe_modules/flavor/default_flavor.py ('k') | infra/bots/recipe_modules/flavor/ios_flavor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/flavor/gn_flavor.py
diff --git a/infra/bots/recipe_modules/skia/gn_flavor.py b/infra/bots/recipe_modules/flavor/gn_flavor.py
similarity index 59%
rename from infra/bots/recipe_modules/skia/gn_flavor.py
rename to infra/bots/recipe_modules/flavor/gn_flavor.py
index 7b60b9a1a0fd603d5a30ca7d512c48aae7abc9c7..ea5bbb69349d8332fbcb84d7a03ea1688eb13503 100644
--- a/infra/bots/recipe_modules/skia/gn_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_flavor.py
@@ -9,17 +9,18 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
def compile(self, target):
"""Build Skia with GN."""
# Get the gn executable.
- fetch_gn = self._skia_api.skia_dir.join('bin', 'fetch-gn')
- self._skia_api.run(self._skia_api.m.step, 'fetch-gn', cmd=[fetch_gn],
- cwd=self._skia_api.skia_dir)
+ fetch_gn = self.m.vars.skia_dir.join('bin', 'fetch-gn')
+ self.m.run(self.m.step, 'fetch-gn',
+ cmd=[fetch_gn],
+ cwd=self.m.vars.skia_dir)
is_debug = 'is_debug=true'
- if self._skia_api.configuration != 'Debug':
- is_debug = 'is_debug=false'
+ if self.m.vars.configuration != 'Debug':
+ is_debug = 'is_debug=false'
gn_args = [is_debug]
- is_clang = 'Clang' in self._skia_api.builder_name
- is_gcc = 'GCC' in self._skia_api.builder_name
+ is_clang = 'Clang' in self.m.vars.builder_name
+ is_gcc = 'GCC' in self.m.vars.builder_name
cc, cxx = 'cc', 'c++'
if is_clang:
@@ -27,7 +28,7 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
elif is_gcc:
cc, cxx = 'gcc', 'g++'
- ccache = self._skia_api.ccache()
+ ccache = self.m.run.ccache()
if ccache:
cc, cxx = '%s %s' % (ccache, cc), '%s %s' % (ccache, cxx)
if is_clang:
@@ -39,14 +40,14 @@ class GNFlavorUtils(default_flavor.DefaultFlavorUtils):
# Run gn gen.
gn_exe = 'gn'
- if self._skia_api.m.platform.is_win:
- gn_exe = 'gn.exe'
+ if self.m.platform.is_win:
+ gn_exe = 'gn.exe'
gn_gen = [gn_exe, 'gen', self.out_dir, '--args=%s' % ' '.join(gn_args)]
- self._skia_api.run(self._skia_api.m.step, 'gn_gen', cmd=gn_gen,
- cwd=self._skia_api.skia_dir)
+ self.m.run(self.m.step, 'gn_gen', cmd=gn_gen,
+ cwd=self.m.vars.skia_dir)
# Run ninja.
ninja_cmd = ['ninja', '-C', self.out_dir]
- self._skia_api.run(self._skia_api.m.step, 'compile %s' % target,
- cmd=ninja_cmd,
- cwd=self._skia_api.skia_dir)
+ self.m.run(self.m.step, 'compile %s' % target,
+ cmd=ninja_cmd,
+ cwd=self.m.vars.skia_dir)
« no previous file with comments | « infra/bots/recipe_modules/flavor/default_flavor.py ('k') | infra/bots/recipe_modules/flavor/ios_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698