def test_generate_manifest_successful_run(self):
     # This test doesn't test any aspect of the real manifest script, it just
     # asserts that TestImporter._generate_manifest would invoke the script.
     host = MockHost()
     importer = TestImporter(host)
     blink_path = '/mock-checkout/third_party/WebKit'
     host.filesystem.write_text_file(blink_path + '/LayoutTests/external/wpt/MANIFEST.json', '{}')
     importer._generate_manifest()
     self.assertEqual(
         host.executive.calls,
         [
             [
                 'python',
                 blink_path + '/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/wpt',
                 'manifest',
                 '--work',
                 '--tests-root',
                 blink_path + '/LayoutTests/external/wpt',
             ],
             [
                 'git',
                 'add',
                 blink_path + '/LayoutTests/external/WPT_BASE_MANIFEST.json',
             ]
         ])
Пример #2
0
 def test_generate_manifest_command_not_found(self):
     # If we're updating csswg-test, then the manifest file won't be found.
     host = MockHost()
     host.filesystem.files = {}
     importer = TestImporter(host)
     importer._generate_manifest(
         '/mock-checkout/third_party/WebKit/LayoutTests/external/csswg-test'
     )
     self.assertEqual(host.executive.calls, [])
Пример #3
0
 def test_generate_manifest_successful_run(self):
     # This test doesn't test any aspect of the real manifest script, it just
     # asserts that TestImporter._generate_manifest would invoke the script.
     host = MockHost()
     importer = TestImporter(host)
     importer._generate_manifest(
         '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt')
     self.assertEqual(host.executive.calls, [
         [
             '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest',
             '--work', '--tests-root',
             '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
         ],
         [
             'git', 'add',
             '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json'
         ]
     ])