| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 'webkit', 'tools', 'layout_tests', 'test_expectations.txt') | 326 'webkit', 'tools', 'layout_tests', 'test_expectations.txt') |
| 327 never_fix_tests_path = port._filesystem.join(port.layout_tests_dir(), 'N
everFixTests') | 327 never_fix_tests_path = port._filesystem.join(port.layout_tests_dir(), 'N
everFixTests') |
| 328 stale_tests_path = port._filesystem.join(port.layout_tests_dir(), 'Stale
TestExpectations') | 328 stale_tests_path = port._filesystem.join(port.layout_tests_dir(), 'Stale
TestExpectations') |
| 329 slow_tests_path = port._filesystem.join(port.layout_tests_dir(), 'SlowTe
sts') | 329 slow_tests_path = port._filesystem.join(port.layout_tests_dir(), 'SlowTe
sts') |
| 330 flaky_tests_path = port._filesystem.join(port.layout_tests_dir(), 'Flaky
Tests') | 330 flaky_tests_path = port._filesystem.join(port.layout_tests_dir(), 'Flaky
Tests') |
| 331 skia_overrides_path = port.path_from_chromium_base( | 331 skia_overrides_path = port.path_from_chromium_base( |
| 332 'skia', 'skia_test_expectations.txt') | 332 'skia', 'skia_test_expectations.txt') |
| 333 | 333 |
| 334 port._filesystem.write_text_file(skia_overrides_path, 'dummy text') | 334 port._filesystem.write_text_file(skia_overrides_path, 'dummy text') |
| 335 | 335 |
| 336 w3c_overrides_path = port.path_from_chromium_base( | |
| 337 'webkit', 'tools', 'layout_tests', 'test_expectations_w3c.txt') | |
| 338 port._filesystem.write_text_file(w3c_overrides_path, 'dummy text') | |
| 339 | |
| 340 port._options.builder_name = 'DUMMY_BUILDER_NAME' | 336 port._options.builder_name = 'DUMMY_BUILDER_NAME' |
| 341 self.assertEqual(port.expectations_files(), | 337 self.assertEqual(port.expectations_files(), |
| 342 [generic_path, skia_overrides_path, w3c_overrides_path, | 338 [generic_path, skia_overrides_path, |
| 343 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, | 339 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, |
| 344 flaky_tests_path, chromium_overrides_path]) | 340 flaky_tests_path, chromium_overrides_path]) |
| 345 | 341 |
| 346 port._options.builder_name = 'builder (deps)' | 342 port._options.builder_name = 'builder (deps)' |
| 347 self.assertEqual(port.expectations_files(), | 343 self.assertEqual(port.expectations_files(), |
| 348 [generic_path, skia_overrides_path, w3c_overrides_path, | 344 [generic_path, skia_overrides_path, |
| 349 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, | 345 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, |
| 350 flaky_tests_path, chromium_overrides_path]) | 346 flaky_tests_path, chromium_overrides_path]) |
| 351 | 347 |
| 352 # A builder which does NOT observe the Chromium test_expectations, | 348 # A builder which does NOT observe the Chromium test_expectations, |
| 353 # but still observes the Skia test_expectations... | 349 # but still observes the Skia test_expectations... |
| 354 port._options.builder_name = 'builder' | 350 port._options.builder_name = 'builder' |
| 355 self.assertEqual(port.expectations_files(), | 351 self.assertEqual(port.expectations_files(), |
| 356 [generic_path, skia_overrides_path, w3c_overrides_path, | 352 [generic_path, skia_overrides_path, |
| 357 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, | 353 never_fix_tests_path, stale_tests_path, slow_tests_pat
h, |
| 358 flaky_tests_path]) | 354 flaky_tests_path]) |
| 359 | 355 |
| 360 def test_check_sys_deps(self): | 356 def test_check_sys_deps(self): |
| 361 port = self.make_port() | 357 port = self.make_port() |
| 362 port._executive = MockExecutive2(exit_code=0) | 358 port._executive = MockExecutive2(exit_code=0) |
| 363 self.assertEqual(port.check_sys_deps(needs_http=False), test_run_results
.OK_EXIT_STATUS) | 359 self.assertEqual(port.check_sys_deps(needs_http=False), test_run_results
.OK_EXIT_STATUS) |
| 364 port._executive = MockExecutive2(exit_code=1, output='testing output fai
lure') | 360 port._executive = MockExecutive2(exit_code=1, output='testing output fai
lure') |
| 365 self.assertEqual(port.check_sys_deps(needs_http=False), test_run_results
.SYS_DEPS_EXIT_STATUS) | 361 self.assertEqual(port.check_sys_deps(needs_http=False), test_run_results
.SYS_DEPS_EXIT_STATUS) |
| 366 | 362 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 saved_environ = os.environ.copy() | 458 saved_environ = os.environ.copy() |
| 463 try: | 459 try: |
| 464 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' | 460 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' |
| 465 self.assertEqual(port.path_to_apache_config_file(), '/existing/httpd
.conf') | 461 self.assertEqual(port.path_to_apache_config_file(), '/existing/httpd
.conf') |
| 466 finally: | 462 finally: |
| 467 os.environ = saved_environ.copy() | 463 os.environ = saved_environ.copy() |
| 468 | 464 |
| 469 def test_additional_platform_directory(self): | 465 def test_additional_platform_directory(self): |
| 470 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) | 466 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) |
| 471 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') | 467 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') |
| OLD | NEW |