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

Side by Side Diff: tools-webrtc/mb/mb_unittest.py

Issue 2753773005: Roll chromium_revision 0036d9b08e..2d05f4450c (457220:457366) (Closed)
Patch Set: Created 3 years, 9 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 | « tools-webrtc/mb/mb.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/python 1 #!/usr/bin/python
2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Tests for mb.py.""" 10 """Tests for mb.py."""
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 files=test_files, ret=0) 372 files=test_files, ret=0)
373 373
374 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] 374 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate']
375 isolate_file_contents = ast.literal_eval(isolate_file) 375 isolate_file_contents = ast.literal_eval(isolate_file)
376 files = isolate_file_contents['variables']['files'] 376 files = isolate_file_contents['variables']['files']
377 command = isolate_file_contents['variables']['command'] 377 command = isolate_file_contents['variables']['command']
378 378
379 self.assertEqual(files, ['base_unittests']) 379 self.assertEqual(files, ['base_unittests'])
380 self.assertEqual(command, [ 380 self.assertEqual(command, [
381 './../../build/android/test_wrapper/logdog_wrapper.py', 381 './../../build/android/test_wrapper/logdog_wrapper.py',
382 '--target', 'base_unittests', 382 '--logdog-bin-cmd', './../../bin/logdog_butler',
383 '--logdog-bin-cmd', '../../bin/logdog_butler', 383 '--project', 'chromium',
384 '--service-account-json',
385 '/creds/service_accounts/service-account-luci-logdog-publisher.json',
386 '--prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}',
387 '--source', '${ISOLATED_OUTDIR}/logcats',
388 '--name', 'unified_logcats',
389 'bin/run_base_unittests',
390 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats',
391 '--target-devices-file', '${SWARMING_BOT_FILE}',
392 '-v',
384 ]) 393 ])
385 394
386 def test_gn_gen_swarming_android_junit_test(self): 395 def test_gn_gen_swarming_android_junit_test(self):
387 test_files = { 396 test_files = {
388 '/tmp/swarming_targets': 'base_unittests\n', 397 '/tmp/swarming_targets': 'base_unittests\n',
389 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( 398 '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
390 "{'base_unittests': {" 399 "{'base_unittests': {"
391 " 'label': '//base:base_unittests'," 400 " 'label': '//base:base_unittests',"
392 " 'type': 'junit_test'," 401 " 'type': 'junit_test',"
393 "}}\n" 402 "}}\n"
394 ), 403 ),
395 '/fake_src/out/Default/base_unittests.runtime_deps': ( 404 '/fake_src/out/Default/base_unittests.runtime_deps': (
396 "base_unittests\n" 405 "base_unittests\n"
397 ), 406 ),
398 } 407 }
399 mbw = self.check(['gen', '-c', 'gn_android_bot', '//out/Default', 408 mbw = self.check(['gen', '-c', 'gn_android_bot', '//out/Default',
400 '--swarming-targets-file', '/tmp/swarming_targets', 409 '--swarming-targets-file', '/tmp/swarming_targets',
401 '--isolate-map-file', 410 '--isolate-map-file',
402 '/fake_src/testing/buildbot/gn_isolate_map.pyl'], 411 '/fake_src/testing/buildbot/gn_isolate_map.pyl'],
403 files=test_files, ret=0) 412 files=test_files, ret=0)
404 413
405 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] 414 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate']
406 isolate_file_contents = ast.literal_eval(isolate_file) 415 isolate_file_contents = ast.literal_eval(isolate_file)
407 files = isolate_file_contents['variables']['files'] 416 files = isolate_file_contents['variables']['files']
408 command = isolate_file_contents['variables']['command'] 417 command = isolate_file_contents['variables']['command']
409 418
410 self.assertEqual(files, ['base_unittests']) 419 self.assertEqual(files, ['base_unittests'])
411 self.assertEqual(command, [ 420 self.assertEqual(command, [
412 './../../build/android/test_wrapper/logdog_wrapper.py', 421 './../../build/android/test_wrapper/logdog_wrapper.py',
413 '--target', 'base_unittests', 422 '--logdog-bin-cmd', './../../bin/logdog_butler',
414 '--logdog-bin-cmd', '../../bin/logdog_butler', 423 '--project', 'chromium',
424 '--service-account-json',
425 '/creds/service_accounts/service-account-luci-logdog-publisher.json',
426 '--prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}',
427 '--source', '${ISOLATED_OUTDIR}/logcats',
428 '--name', 'unified_logcats',
429 'bin/run_base_unittests',
430 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats',
431 '-v',
415 ]) 432 ])
416 433
417 def test_gn_gen_non_parallel_console_test_launcher(self): 434 def test_gn_gen_non_parallel_console_test_launcher(self):
418 test_files = { 435 test_files = {
419 '/tmp/swarming_targets': 'base_unittests\n', 436 '/tmp/swarming_targets': 'base_unittests\n',
420 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( 437 '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
421 "{'base_unittests': {" 438 "{'base_unittests': {"
422 " 'label': '//base:base_unittests'," 439 " 'label': '//base:base_unittests',"
423 " 'type': 'non_parallel_console_test_launcher'," 440 " 'type': 'non_parallel_console_test_launcher',"
424 "}}\n" 441 "}}\n"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 self.check(['lookup', '-c', 'fake_config'], mbw=mbw, 778 self.check(['lookup', '-c', 'fake_config'], mbw=mbw,
762 ret=0, 779 ret=0,
763 out=("GYP_DEFINES='foo=bar baz=1'\n" 780 out=("GYP_DEFINES='foo=bar baz=1'\n"
764 "GYP_LINK_CONCURRENCY=1\n" 781 "GYP_LINK_CONCURRENCY=1\n"
765 "LLVM_FORCE_HEAD_REVISION=1\n" 782 "LLVM_FORCE_HEAD_REVISION=1\n"
766 "python build/gyp_chromium -G output_dir=_path_\n")) 783 "python build/gyp_chromium -G output_dir=_path_\n"))
767 784
768 785
769 if __name__ == '__main__': 786 if __name__ == '__main__':
770 unittest.main() 787 unittest.main()
OLDNEW
« no previous file with comments | « tools-webrtc/mb/mb.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698