Bug 84617

Summary: test-webkitpy is failing
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric: review+, eric: commit-queue+

Description Eric Seidel (no email) 2012-04-23 12:10:15 PDT
File "./Tools/Scripts/test-webkitpy", line 64, in <module>
    sys.exit(not tester.run())
  File "/mnt/git/webkit-sheriff-bot/Tools/Scripts/webkitpy/test/main.py", line 138, in run
    return self._run_tests(names)
  File "/mnt/git/webkit-sheriff-bot/Tools/Scripts/webkitpy/test/main.py", line 169, in _run_tests
    suites.append(loader.loadTestsFromName(name, None))
  File "/usr/lib/python2.6/unittest.py", line 587, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib/python2.6/unittest.py", line 559, in loadTestsFromModule
    tests.append(self.loadTestsFromTestCase(obj))
  File "/usr/lib/python2.6/unittest.py", line 550, in loadTestsFromTestCase
    return self.suiteClass(map(testCaseClass, testCaseNames))
  File "/mnt/git/webkit-sheriff-bot/Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py", line 44, in __init__
    self.clean_all_lockfile()
  File "/mnt/git/webkit-sheriff-bot/Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py", line 52, in clean_all_lockfile
    self.filesystem.unlink(file_name)
AttributeError: 'FileSystem' object has no attribute 'unlink'

Unclear when it started.
Comment 1 Dirk Pranke 2012-04-23 12:42:21 PDT
Created attachment 138400 [details]
Patch
Comment 2 Dirk Pranke 2012-04-23 12:43:24 PDT
Looks like that code triggers only in error cases; it's probably been broken for a long time.

This is a quick fix, but all of this test code should probably be rewritten to use a MockFileSystem (there's already a FIXME for that in the code; I'll file a separate bug).
Comment 3 Eric Seidel (no email) 2012-04-23 12:44:36 PDT
Comment on attachment 138400 [details]
Patch

LGTM.  Thanks.
Comment 4 Dirk Pranke 2012-04-23 12:49:12 PDT
Committed r114933: <http://trac.webkit.org/changeset/114933>
Comment 5 Dirk Pranke 2012-04-23 12:50:00 PDT
bug 84617 filed for that.