Bug 67835

Summary: [NRWT] the nrwt check httpd with --no-http option
Product: WebKit Reporter: Kristóf Kosztyó <kkristof>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dpranke, ossy, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 67847    
Bug Blocks:    
Attachments:
Description Flags
proposed fix
none
fix for the test-webkitpy
ossy: review-, ossy: commit-queue-
proposed fix none

Description Kristóf Kosztyó 2011-09-09 01:38:00 PDT
$ Tools/Scripts/new-run-webkit-tests --platform=qt --no-http
Could not find apache. Not installed or unknown path.
Traceback (most recent call last):
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 440, in <module>
    sys.exit(main())
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 435, in main
    return run(port, options, args)
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 105, in run
    result_summary = manager.set_up_run()
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 838, in set_up_run
    if not self._port.check_sys_deps(self.needs_servers()):
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py", line 192, in check_sys_deps
    return self.check_httpd()
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py", line 239, in check_httpd
    server_name = self._filesystem.basename(httpd_path)
  File "/home/kosztyo/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py", line 71, in basename
    return os.path.basename(path)
  File "/usr/lib/python2.6/posixpath.py", line 111, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Comment 1 Kristóf Kosztyó 2011-09-09 01:41:50 PDT
Created attachment 106850 [details]
proposed fix
Comment 2 Csaba Osztrogonác 2011-09-09 06:03:26 PDT
Comment on attachment 106850 [details]
proposed fix

Nice catch, r=me.
Comment 3 Csaba Osztrogonác 2011-09-09 06:04:51 PDT
Unfortunately I got same error message without --no-http if I don't have apache.
Could you file another bug report about it? It would be better if NRWT exits with a nicer mode.
Comment 4 Csaba Osztrogonác 2011-09-09 06:07:08 PDT
Comment on attachment 106850 [details]
proposed fix

Clearing flags on attachment: 106850

Committed r94851: <http://trac.webkit.org/changeset/94851>
Comment 5 Csaba Osztrogonác 2011-09-09 06:07:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Csaba Osztrogonác 2011-09-09 07:08:05 PDT
It broke a unittest: 

Traceback (most recent call last):
  File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py", line 239, in test_needs_servers
    self.assertTrue(manager.needs_servers())
  File "/ramdisk/qt-linux-release/build/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 820, in needs_servers
    return any(self._test_requires_lock(test_name) for test_name in self._test_files) and self._options.http
AttributeError: 'MockOptions' object has no attribute 'http'
Comment 7 Kristóf Kosztyó 2011-09-09 07:25:23 PDT
Created attachment 106867 [details]
fix for the test-webkitpy
Comment 8 Csaba Osztrogonác 2011-09-09 07:38:36 PDT
Comment on attachment 106867 [details]
fix for the test-webkitpy

Argh, it is an ugly hack. :-/ We should find a proper fix for it.
Comment 9 Csaba Osztrogonác 2011-09-09 07:41:40 PDT
Dirk, Tony, could you give us some hint how should we fix this webkitpy test in a proper way?
Comment 10 Csaba Osztrogonác 2011-09-09 07:49:41 PDT
Original patch was rolled out by http://trac.webkit.org/changeset/94853
Comment 11 Kristóf Kosztyó 2011-09-09 07:56:19 PDT
Created attachment 106871 [details]
proposed fix

Indeed it was an ugly hack, maybe this will be better.
Comment 12 WebKit Review Bot 2011-09-09 10:59:17 PDT
Comment on attachment 106871 [details]
proposed fix

Clearing flags on attachment: 106871

Committed r94863: <http://trac.webkit.org/changeset/94863>
Comment 13 WebKit Review Bot 2011-09-09 10:59:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Dirk Pranke 2011-09-09 11:02:21 PDT
Comment on attachment 106871 [details]
proposed fix

Hm. Ideally you'd pass in the http flag to get_manager_with_tests and add a third test to make sure that the right thing happens with http=False as well.