Bug 52420
Summary: | webkitpy.layout_tests unit tests talk to the network/filesystem | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | abarth, dpranke, mihaip |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 |
Eric Seidel (no email)
webkitpy.layout_tests.layout_package.json_results_generator_unittest.JSONGeneratorTest.test_json_generation
and
webkitpy.layout_tests.run_webkit_tests_unittest.MainTest.test_last_results
both call JsonResultsGenerator.get_json w/o mocking out _get_archived_json_results, which in turn tries to talk to the network (and write to the file system)
They log:
Local results.json file does not exist. Grabbing it off the archive at http://build.chromium.org/buildbot/layout_test_results/DUMMY_BUILD_NAME/results.json\
This is bad news bears.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
To reproduce this, just remove your /tmp/layout-test-results directory, and watch test-webkitpy recreate it and add a results.json file to it (which it shouldn't be doing).
Eric Seidel (no email)
Here are the stacks (I added bogus exception to _get_archived_json_results to generate them):
======================================================================
ERROR: test_json_generation (webkitpy.layout_tests.layout_package.json_results_generator_unittest.JSONGeneratorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py", line 197, in test_json_generation
self._test_json_generation([], [])
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py", line 95, in _test_json_generation
incremental_json = generator.get_json(incremental=True)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py", line 203, in get_json
results_json, error = self._get_archived_json_results(incremental)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py", line 350, in _get_archived_json_results
raise "foo"
TypeError: exceptions must be classes or instances, not str
======================================================================
ERROR: test_last_results (webkitpy.layout_tests.run_webkit_tests_unittest.MainTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py", line 242, in test_last_results
passing_run(['--clobber-old-results'], record_results=True)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py", line 97, in passing_run
res = run_webkit_tests.run(port_obj, options, parsed_args)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 117, in run
num_unexpected_results = runner.run(result_summary)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py", line 693, in run
individual_test_timings)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py", line 826, in _upload_json_files
self._options.master_name)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py", line 88, in __init__
self.generate_json_output()
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py", line 181, in generate_json_output
self._json = self.get_json()
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py", line 203, in get_json
results_json, error = self._get_archived_json_results(incremental)
File "/Projects/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py", line 350, in _get_archived_json_results
raise "foo"
TypeError: exceptions must be classes or instances, not str
----------------------------------------------------------------------
_get_archived_json_results should really be split into smaller chunks and the parts which talk to the network mocked.