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

Unified Diff: scripts/slave/recipes/infra/publish_tarball.py

Issue 1100783002: infra/publish_tarball: move export_tarball.py to recipes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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
Index: scripts/slave/recipes/infra/publish_tarball.py
diff --git a/scripts/slave/recipes/infra/publish_tarball.py b/scripts/slave/recipes/infra/publish_tarball.py
index 5bb2554f9d533bb46ba1aab22f9a3455400f9202..02fa802644c9bee2137b6d4131063c1d7bd9c804 100644
--- a/scripts/slave/recipes/infra/publish_tarball.py
+++ b/scripts/slave/recipes/infra/publish_tarball.py
@@ -4,6 +4,7 @@
DEPS = [
'bot_update',
+ 'chromium',
'gclient',
'gsutil',
'omahaproxy',
@@ -16,24 +17,12 @@ DEPS = [
]
-def export_tarball_has_progress(api):
- step_result = api.python(
- 'export_tarball.py --help',
- api.path['checkout'].join(
- 'tools', 'export_tarball', 'export_tarball.py'),
- ['--help'],
- stdout=api.raw_io.output()
- )
- return '--progress' in step_result.stdout
-
-
def export_tarball(api, args, source, destination):
try:
temp_dir = api.path.mkdtemp('export_tarball')
api.python(
'export_tarball',
- api.path['checkout'].join(
- 'tools', 'export_tarball', 'export_tarball.py'),
+ api.chromium.resource('export_tarball.py'),
args,
cwd=temp_dir)
api.gsutil.upload(
@@ -68,16 +57,14 @@ def GenSteps(api):
solution.revision = 'refs/tags/%s' % version
api.bot_update.ensure_checkout(force=True, with_branch_heads=True)
- extra_args = []
- if export_tarball_has_progress(api):
- extra_args.append('--progress')
export_tarball(
api,
# Verbose output helps avoid a buildbot timeout when no output
# is produced for a long time.
['--remove-nonessential-files',
'chromium-%s' % version,
- '--verbose'] + extra_args,
+ '--verbose',
+ '--progress'],
'chromium-%s.tar.xz' % version,
'chromium-%s.tar.xz' % version)
@@ -85,9 +72,7 @@ def GenTests(api):
yield (
api.test('basic') +
api.properties.generic(version='38.0.2125.122') +
- api.platform('linux', 64) +
- api.step_data('export_tarball.py --help',
- stdout=api.raw_io.output('--progress'))
+ api.platform('linux', 64)
)
yield (

Powered by Google App Engine
This is Rietveld 408576698