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

Side by Side Diff: tests/swarming_test.py

Issue 40553002: Set the priority in the correct location (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 1 month 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 | « swarming.py ('k') | no next file » | 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 Chromium Authors. All rights reserved. 2 # Copyright 2013 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 import hashlib 6 import hashlib
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import StringIO 10 import StringIO
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 os_value = unicode(swarming.PLATFORM_MAPPING_SWARMING[slave_os]) 419 os_value = unicode(swarming.PLATFORM_MAPPING_SWARMING[slave_os])
420 expected = { 420 expected = {
421 u'cleanup': u'root', 421 u'cleanup': u'root',
422 u'configurations': [ 422 u'configurations': [
423 { 423 {
424 u'config_name': os_value, 424 u'config_name': os_value,
425 u'dimensions': { 425 u'dimensions': {
426 u'os': os_value, 426 u'os': os_value,
427 }, 427 },
428 u'min_instances': shards, 428 u'min_instances': shards,
429 u'priority': 101,
429 }, 430 },
430 ], 431 ],
431 u'data': [], 432 u'data': [],
432 u'env_vars': {}, 433 u'env_vars': {},
433 u'restart_on_failure': True, 434 u'restart_on_failure': True,
434 u'test_case_name': TEST_NAME, 435 u'test_case_name': TEST_NAME,
435 u'tests': chromium_tasks(isolate_server), 436 u'tests': chromium_tasks(isolate_server),
436 u'working_dir': unicode(working_dir), 437 u'working_dir': unicode(working_dir),
437 u'priority': 101,
438 } 438 }
439 if shards > 1: 439 if shards > 1:
440 expected[u'env_vars'][u'GTEST_SHARD_INDEX'] = u'%(instance_index)s' 440 expected[u'env_vars'][u'GTEST_SHARD_INDEX'] = u'%(instance_index)s'
441 expected[u'env_vars'][u'GTEST_TOTAL_SHARDS'] = u'%(num_instances)s' 441 expected[u'env_vars'][u'GTEST_TOTAL_SHARDS'] = u'%(num_instances)s'
442 if profile: 442 if profile:
443 expected[u'tests'][0][u'action'].append(u'--verbose') 443 expected[u'tests'][0][u'action'].append(u'--verbose')
444 return expected 444 return expected
445 445
446 446
447 class MockedStorage(object): 447 class MockedStorage(object):
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 'Usage: swarming.py trigger [options]\n\n' 619 'Usage: swarming.py trigger [options]\n\n'
620 'swarming.py: error: At least one --task is required.\n') 620 'swarming.py: error: At least one --task is required.\n')
621 621
622 622
623 if __name__ == '__main__': 623 if __name__ == '__main__':
624 logging.basicConfig( 624 logging.basicConfig(
625 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) 625 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
626 if '-v' in sys.argv: 626 if '-v' in sys.argv:
627 unittest.TestCase.maxDiff = None 627 unittest.TestCase.maxDiff = None
628 unittest.main() 628 unittest.main()
OLDNEW
« no previous file with comments | « swarming.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698