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

Side by Side Diff: client/swarming.py

Issue 2069903003: swarming: custom cipd package paths (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@cipd-win
Patch Set: fix _validate_cipd_path Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « client/run_isolated.py ('k') | client/tests/run_isolated_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The LUCI Authors. All rights reserved. 2 # Copyright 2013 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Client tool to trigger tasks or retrieve results from a Swarming server.""" 6 """Client tool to trigger tasks or retrieve results from a Swarming server."""
7 7
8 __version__ = '0.8.5' 8 __version__ = '0.8.5'
9 9
10 import collections 10 import collections
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 properties['inputs_ref']['isolated'], 1403 properties['inputs_ref']['isolated'],
1404 storage, 1404 storage,
1405 isolateserver.MemoryCache(file_mode_mask=0700), 1405 isolateserver.MemoryCache(file_mode_mask=0700),
1406 workdir) 1406 workdir)
1407 command = bundle.command 1407 command = bundle.command
1408 if bundle.relative_cwd: 1408 if bundle.relative_cwd:
1409 workdir = os.path.join(workdir, bundle.relative_cwd) 1409 workdir = os.path.join(workdir, bundle.relative_cwd)
1410 command.extend(properties.get('extra_args') or []) 1410 command.extend(properties.get('extra_args') or [])
1411 # https://github.com/luci/luci-py/blob/master/appengine/swarming/doc/Magic-V alues.md 1411 # https://github.com/luci/luci-py/blob/master/appengine/swarming/doc/Magic-V alues.md
1412 new_command = run_isolated.process_command( 1412 new_command = run_isolated.process_command(
1413 command, options.output_dir, None, None) 1413 command, options.output_dir, None)
1414 if not options.output_dir and new_command != command: 1414 if not options.output_dir and new_command != command:
1415 parser.error('The task has outputs, you must use --output-dir') 1415 parser.error('The task has outputs, you must use --output-dir')
1416 command = new_command 1416 command = new_command
1417 else: 1417 else:
1418 command = properties['command'] 1418 command = properties['command']
1419 try: 1419 try:
1420 return subprocess.call(command + extra_args, env=env, cwd=workdir) 1420 return subprocess.call(command + extra_args, env=env, cwd=workdir)
1421 except OSError as e: 1421 except OSError as e:
1422 print >> sys.stderr, 'Failed to run: %s' % ' '.join(command) 1422 print >> sys.stderr, 'Failed to run: %s' % ' '.join(command)
1423 print >> sys.stderr, str(e) 1423 print >> sys.stderr, str(e)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 dispatcher = subcommand.CommandDispatcher(__name__) 1542 dispatcher = subcommand.CommandDispatcher(__name__)
1543 return dispatcher.execute(OptionParserSwarming(version=__version__), args) 1543 return dispatcher.execute(OptionParserSwarming(version=__version__), args)
1544 1544
1545 1545
1546 if __name__ == '__main__': 1546 if __name__ == '__main__':
1547 subprocess42.inhibit_os_error_reporting() 1547 subprocess42.inhibit_os_error_reporting()
1548 fix_encoding.fix_encoding() 1548 fix_encoding.fix_encoding()
1549 tools.disable_buffering() 1549 tools.disable_buffering()
1550 colorama.init() 1550 colorama.init()
1551 sys.exit(main(sys.argv[1:])) 1551 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « client/run_isolated.py ('k') | client/tests/run_isolated_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698