Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 files=test_files, ret=0) | 473 files=test_files, ret=0) |
| 474 | 474 |
| 475 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] | 475 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] |
| 476 isolate_file_contents = ast.literal_eval(isolate_file) | 476 isolate_file_contents = ast.literal_eval(isolate_file) |
| 477 files = isolate_file_contents['variables']['files'] | 477 files = isolate_file_contents['variables']['files'] |
| 478 command = isolate_file_contents['variables']['command'] | 478 command = isolate_file_contents['variables']['command'] |
| 479 | 479 |
| 480 self.assertEqual(files, [ | 480 self.assertEqual(files, [ |
| 481 '../../testing/test_env.py', | 481 '../../testing/test_env.py', |
| 482 '../../testing/xvfb.py', | 482 '../../testing/xvfb.py', |
| 483 '../../third_party/gtest-parallel/gtest-parallel', | 483 '../../third_party/gtest-parallel/gtest-parallel', |
|
pbos-webrtc
2017/03/29 17:52:01
and this?
| |
| 484 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 484 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 485 'base_unittests', | 485 'base_unittests', |
| 486 'some_resource_file', | 486 'some_resource_file', |
| 487 ]) | 487 ]) |
| 488 self.assertEqual(command, [ | 488 self.assertEqual(command, [ |
| 489 '../../testing/xvfb.py', | 489 '../../testing/xvfb.py', |
| 490 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 490 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 491 '--output_dir=${ISOLATED_OUTDIR}/test_logs', | 491 '--output_dir=${ISOLATED_OUTDIR}/test_logs', |
| 492 './base_unittests', | 492 './base_unittests', |
| 493 '--', | 493 '--', |
| 494 '--asan=0', | 494 '--asan=0', |
| 495 '--msan=0', | 495 '--msan=0', |
| 496 '--tsan=0', | 496 '--tsan=0', |
| 497 ]) | 497 ]) |
| 498 | 498 |
| 499 def test_gn_gen_windowed_test_launcher_win(self): | 499 def test_gn_gen_windowed_test_launcher_win(self): |
| 500 files = { | 500 files = { |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 518 '/fake_src/testing/buildbot/gn_isolate_map.pyl', | 518 '/fake_src/testing/buildbot/gn_isolate_map.pyl', |
| 519 '//out/Default'], mbw=mbw, ret=0) | 519 '//out/Default'], mbw=mbw, ret=0) |
| 520 | 520 |
| 521 isolate_file = mbw.files['c:\\fake_src\\out\\Default\\unittests.isolate'] | 521 isolate_file = mbw.files['c:\\fake_src\\out\\Default\\unittests.isolate'] |
| 522 isolate_file_contents = ast.literal_eval(isolate_file) | 522 isolate_file_contents = ast.literal_eval(isolate_file) |
| 523 files = isolate_file_contents['variables']['files'] | 523 files = isolate_file_contents['variables']['files'] |
| 524 command = isolate_file_contents['variables']['command'] | 524 command = isolate_file_contents['variables']['command'] |
| 525 | 525 |
| 526 self.assertEqual(files, [ | 526 self.assertEqual(files, [ |
| 527 '../../testing/test_env.py', | 527 '../../testing/test_env.py', |
| 528 '../../third_party/gtest-parallel/gtest-parallel', | 528 '../../third_party/gtest-parallel/gtest-parallel', |
|
pbos-webrtc
2017/03/29 17:52:01
this one too?
| |
| 529 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 529 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 530 'some_dependency', | 530 'some_dependency', |
| 531 'unittests.exe', | 531 'unittests.exe', |
| 532 ]) | 532 ]) |
| 533 self.assertEqual(command, [ | 533 self.assertEqual(command, [ |
| 534 '../../testing/test_env.py', | 534 '../../testing/test_env.py', |
| 535 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 535 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 536 '--output_dir=${ISOLATED_OUTDIR}\\test_logs', | 536 '--output_dir=${ISOLATED_OUTDIR}\\test_logs', |
| 537 r'.\unittests.exe', | 537 r'.\unittests.exe', |
| 538 '--', | 538 '--', |
| 539 '--asan=0', | 539 '--asan=0', |
| 540 '--msan=0', | 540 '--msan=0', |
| 541 '--tsan=0', | 541 '--tsan=0', |
| 542 ]) | 542 ]) |
| 543 | 543 |
| 544 def test_gn_gen_console_test_launcher(self): | 544 def test_gn_gen_console_test_launcher(self): |
| 545 test_files = { | 545 test_files = { |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 560 '/fake_src/testing/buildbot/gn_isolate_map.pyl'], | 560 '/fake_src/testing/buildbot/gn_isolate_map.pyl'], |
| 561 files=test_files, ret=0) | 561 files=test_files, ret=0) |
| 562 | 562 |
| 563 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] | 563 isolate_file = mbw.files['/fake_src/out/Default/base_unittests.isolate'] |
| 564 isolate_file_contents = ast.literal_eval(isolate_file) | 564 isolate_file_contents = ast.literal_eval(isolate_file) |
| 565 files = isolate_file_contents['variables']['files'] | 565 files = isolate_file_contents['variables']['files'] |
| 566 command = isolate_file_contents['variables']['command'] | 566 command = isolate_file_contents['variables']['command'] |
| 567 | 567 |
| 568 self.assertEqual(files, [ | 568 self.assertEqual(files, [ |
| 569 '../../testing/test_env.py', | 569 '../../testing/test_env.py', |
| 570 '../../third_party/gtest-parallel/gtest-parallel', | 570 '../../third_party/gtest-parallel/gtest-parallel', |
|
pbos-webrtc
2017/03/29 17:52:01
and this
| |
| 571 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 571 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 572 'base_unittests', | 572 'base_unittests', |
| 573 ]) | 573 ]) |
| 574 self.assertEqual(command, [ | 574 self.assertEqual(command, [ |
| 575 '../../testing/test_env.py', | 575 '../../testing/test_env.py', |
| 576 '../../third_party/gtest-parallel/gtest-parallel-wrapper.py', | 576 '../../tools-webrtc/gtest-parallel-wrapper.py', |
| 577 '--output_dir=${ISOLATED_OUTDIR}/test_logs', | 577 '--output_dir=${ISOLATED_OUTDIR}/test_logs', |
| 578 './base_unittests', | 578 './base_unittests', |
| 579 '--', | 579 '--', |
| 580 '--asan=0', | 580 '--asan=0', |
| 581 '--msan=0', | 581 '--msan=0', |
| 582 '--tsan=0', | 582 '--tsan=0', |
| 583 ]) | 583 ]) |
| 584 | 584 |
| 585 def test_gn_isolate_console_test_launcher_memcheck(self): | 585 def test_gn_isolate_console_test_launcher_memcheck(self): |
| 586 test_files = { | 586 test_files = { |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 self.check(['lookup', '-c', 'fake_config'], mbw=mbw, | 762 self.check(['lookup', '-c', 'fake_config'], mbw=mbw, |
| 763 ret=0, | 763 ret=0, |
| 764 out=("GYP_DEFINES='foo=bar baz=1'\n" | 764 out=("GYP_DEFINES='foo=bar baz=1'\n" |
| 765 "GYP_LINK_CONCURRENCY=1\n" | 765 "GYP_LINK_CONCURRENCY=1\n" |
| 766 "LLVM_FORCE_HEAD_REVISION=1\n" | 766 "LLVM_FORCE_HEAD_REVISION=1\n" |
| 767 "python build/gyp_chromium -G output_dir=_path_\n")) | 767 "python build/gyp_chromium -G output_dir=_path_\n")) |
| 768 | 768 |
| 769 | 769 |
| 770 if __name__ == '__main__': | 770 if __name__ == '__main__': |
| 771 unittest.main() | 771 unittest.main() |
| OLD | NEW |