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

Side by Side Diff: example/run_example_swarm.py

Issue 22980008: Merge all swarm_*.py scripts into swarming.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « README.py ('k') | swarm_get_results.py » ('j') | swarming.py » ('J')
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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs hello_world.py, through hello_world.isolate, remotely on a Swarm slave. 6 """Runs hello_world.py, through hello_world.isolate, remotely on a Swarm slave.
7 """ 7 """
8 8
9 import datetime 9 import datetime
10 import getpass 10 import getpass
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 run( 63 run(
64 [ 64 [
65 'isolate.py', 65 'isolate.py',
66 'hashtable', 66 'hashtable',
67 '--isolate', os.path.join(ROOT_DIR, 'hello_world.isolate'), 67 '--isolate', os.path.join(ROOT_DIR, 'hello_world.isolate'),
68 '--isolated', isolated, 68 '--isolated', isolated,
69 '--outdir', options.isolate_server, 69 '--outdir', options.isolate_server,
70 ], 70 ],
71 options.verbose) 71 options.verbose)
72 72
73 # Note that swarm_trigger_and_get_results.py could be used to run and get 73 # Note that swarming.py run could be used to run and get results as a single
74 # results as a single call. 74 # call.
75 print('\nRunning') 75 print('\nRunning')
76 hashval = hashlib.sha1(open(isolated, 'rb').read()).hexdigest() 76 hashval = hashlib.sha1(open(isolated, 'rb').read()).hexdigest()
77 run( 77 run(
78 [ 78 [
79 'swarm_trigger_step.py', 79 'swarming.py',
80 'trigger',
80 '--os_image', sys.platform, 81 '--os_image', sys.platform,
81 '--swarm-url', options.swarm_server, 82 '--swarm-url', options.swarm_server,
82 '--test-name-prefix', prefix, 83 '--test-name-prefix', prefix,
83 '--data-server', options.isolate_server, 84 '--data-server', options.isolate_server,
84 '--run_from_hash', hashval, 85 '--run_from_hash', hashval,
85 'hello_world', 86 'hello_world',
86 # Number of shards. 87 # Number of shards.
87 '1', 88 '1',
88 '*', 89 '*',
89 ], 90 ],
90 options.verbose) 91 options.verbose)
91 92
92 print('\nGetting results') 93 print('\nGetting results')
93 run( 94 run(
94 [ 95 [
95 'swarm_get_results.py', 96 'swarming.py',
97 'results',
Vadim Sh. 2013/08/16 18:58:58 What do you think about renaming it to some verb?
M-A Ruel 2013/08/18 00:18:18 Good idea, chose collect.
96 '--url', options.swarm_server, 98 '--url', options.swarm_server,
97 prefix + 'hello_world', 99 prefix + 'hello_world',
98 ], 100 ],
99 options.verbose) 101 options.verbose)
100 finally: 102 finally:
101 shutil.rmtree(tempdir) 103 shutil.rmtree(tempdir)
102 return 0 104 return 0
103 105
104 106
105 if __name__ == '__main__': 107 if __name__ == '__main__':
106 sys.exit(main()) 108 sys.exit(main())
OLDNEW
« no previous file with comments | « README.py ('k') | swarm_get_results.py » ('j') | swarming.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698