OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 '{[{[') | 483 '{[{[') |
484 self.assertRaises(ValueError, port.virtual_test_suites) | 484 self.assertRaises(ValueError, port.virtual_test_suites) |
485 | 485 |
486 def test_missing_virtual_test_suite_file(self): | 486 def test_missing_virtual_test_suite_file(self): |
487 port = self.make_port() | 487 port = self.make_port() |
488 self.assertRaises(AssertionError, port.virtual_test_suites) | 488 self.assertRaises(AssertionError, port.virtual_test_suites) |
489 | 489 |
490 def test_is_wptserve_test(self): | 490 def test_is_wptserve_test(self): |
491 port = self.make_port() | 491 port = self.make_port() |
492 self.assertTrue(port.is_wptserve_test('external/wpt/foo/bar.html')) | 492 self.assertTrue(port.is_wptserve_test('external/wpt/foo/bar.html')) |
| 493 self.assertTrue(port.is_wptserve_test('virtual/a-name/external/wpt/baz/q
ux.htm')) |
493 self.assertFalse(port.is_wptserve_test('http/wpt/foo.html')) | 494 self.assertFalse(port.is_wptserve_test('http/wpt/foo.html')) |
| 495 self.assertFalse(port.is_wptserve_test('virtual/external/wpt/baz/qux.htm
')) |
| 496 self.assertFalse(port.is_wptserve_test('not-virtual/a-name/external/wpt/
baz/qux.htm')) |
494 | 497 |
495 def test_default_results_directory(self): | 498 def test_default_results_directory(self): |
496 port = self.make_port(options=optparse.Values({'target': 'Default', 'con
figuration': 'Release'})) | 499 port = self.make_port(options=optparse.Values({'target': 'Default', 'con
figuration': 'Release'})) |
497 # By default the results directory is in the build directory: out/<targe
t>. | 500 # By default the results directory is in the build directory: out/<targe
t>. |
498 self.assertEqual(port.default_results_directory(), '/mock-checkout/out/D
efault/layout-test-results') | 501 self.assertEqual(port.default_results_directory(), '/mock-checkout/out/D
efault/layout-test-results') |
499 | 502 |
500 def test_results_directory(self): | 503 def test_results_directory(self): |
501 port = self.make_port(options=optparse.Values({'results_directory': 'som
e-directory/results'})) | 504 port = self.make_port(options=optparse.Values({'results_directory': 'som
e-directory/results'})) |
502 # A results directory can be given as an option, and it is relative to c
urrent working directory. | 505 # A results directory can be given as an option, and it is relative to c
urrent working directory. |
503 self.assertEqual(port.host.filesystem.cwd, '/') | 506 self.assertEqual(port.host.filesystem.cwd, '/') |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 self.assertEqual(suite.args, ['--args']) | 637 self.assertEqual(suite.args, ['--args']) |
635 self.assertEqual(suite.reference_args, []) | 638 self.assertEqual(suite.reference_args, []) |
636 | 639 |
637 def test_non_default_reference_args(self): | 640 def test_non_default_reference_args(self): |
638 suite = VirtualTestSuite(prefix='suite', base='base/foo', args=['--args'
], references_use_default_args=False) | 641 suite = VirtualTestSuite(prefix='suite', base='base/foo', args=['--args'
], references_use_default_args=False) |
639 self.assertEqual(suite.args, ['--args']) | 642 self.assertEqual(suite.args, ['--args']) |
640 self.assertEqual(suite.reference_args, suite.args) | 643 self.assertEqual(suite.reference_args, suite.args) |
641 | 644 |
642 def test_no_slash(self): | 645 def test_no_slash(self): |
643 self.assertRaises(AssertionError, VirtualTestSuite, prefix='suite/bar',
base='base/foo', args=['--args']) | 646 self.assertRaises(AssertionError, VirtualTestSuite, prefix='suite/bar',
base='base/foo', args=['--args']) |
OLD | NEW |