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

Side by Side Diff: tools_webrtc/mb/mb_unittest.py

Issue 3008343002: WebRTC: Save logcat output to isolated outputs. (Closed)
Patch Set: Created 3 years, 3 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 '--target', 'base_unittests',
383 '--logdog-bin-cmd', '../../bin/logdog_butler', 383 '--logdog-bin-cmd', '../../bin/logdog_butler',
384 '--target-devices-file', '${SWARMING_BOT_FILE}' 384 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats',
385 '--store-tombstones',
386 '--target-devices-file', '${SWARMING_BOT_FILE}',
385 ]) 387 ])
386 388
387 def test_gn_gen_swarming_android_junit_test(self): 389 def test_gn_gen_swarming_android_junit_test(self):
388 test_files = { 390 test_files = {
389 '/tmp/swarming_targets': 'base_unittests\n', 391 '/tmp/swarming_targets': 'base_unittests\n',
390 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( 392 '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
391 "{'base_unittests': {" 393 "{'base_unittests': {"
392 " 'label': '//base:base_unittests'," 394 " 'label': '//base:base_unittests',"
393 " 'type': 'junit_test'," 395 " 'type': 'junit_test',"
394 "}}\n" 396 "}}\n"
(...skipping 11 matching lines...) Expand all
406 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] 408 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate']
407 isolate_file_contents = ast.literal_eval(isolate_file) 409 isolate_file_contents = ast.literal_eval(isolate_file)
408 files = isolate_file_contents['variables']['files'] 410 files = isolate_file_contents['variables']['files']
409 command = isolate_file_contents['variables']['command'] 411 command = isolate_file_contents['variables']['command']
410 412
411 self.assertEqual(files, ['base_unittests']) 413 self.assertEqual(files, ['base_unittests'])
412 self.assertEqual(command, [ 414 self.assertEqual(command, [
413 '../../build/android/test_wrapper/logdog_wrapper.py', 415 '../../build/android/test_wrapper/logdog_wrapper.py',
414 '--target', 'base_unittests', 416 '--target', 'base_unittests',
415 '--logdog-bin-cmd', '../../bin/logdog_butler', 417 '--logdog-bin-cmd', '../../bin/logdog_butler',
418 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats',
419 '--store-tombstones',
416 ]) 420 ])
417 421
418 def test_gn_gen_non_parallel_console_test_launcher(self): 422 def test_gn_gen_non_parallel_console_test_launcher(self):
419 test_files = { 423 test_files = {
420 '/tmp/swarming_targets': 'base_unittests\n', 424 '/tmp/swarming_targets': 'base_unittests\n',
421 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( 425 '/fake_src/testing/buildbot/gn_isolate_map.pyl': (
422 "{'base_unittests': {" 426 "{'base_unittests': {"
423 " 'label': '//base:base_unittests'," 427 " 'label': '//base:base_unittests',"
424 " 'type': 'non_parallel_console_test_launcher'," 428 " 'type': 'non_parallel_console_test_launcher',"
425 "}}\n" 429 "}}\n"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 self.check(['lookup', '-c', 'fake_config'], mbw=mbw, 792 self.check(['lookup', '-c', 'fake_config'], mbw=mbw,
789 ret=0, 793 ret=0,
790 out=("GYP_DEFINES='foo=bar baz=1'\n" 794 out=("GYP_DEFINES='foo=bar baz=1'\n"
791 "GYP_LINK_CONCURRENCY=1\n" 795 "GYP_LINK_CONCURRENCY=1\n"
792 "LLVM_FORCE_HEAD_REVISION=1\n" 796 "LLVM_FORCE_HEAD_REVISION=1\n"
793 "python build/gyp_chromium -G output_dir=_path_\n")) 797 "python build/gyp_chromium -G output_dir=_path_\n"))
794 798
795 799
796 if __name__ == '__main__': 800 if __name__ == '__main__':
797 unittest.main() 801 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