Bug 64533 - new-run-webkit-tests crashes on Apple's Windows port when trying to launch Apache
Summary: new-run-webkit-tests crashes on Apple's Windows port when trying to launch Ap...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 38756
  Show dependency treegraph
 
Reported: 2011-07-14 09:13 PDT by Adam Roben (:aroben)
Modified: 2011-07-15 15:40 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.23 KB, patch)
2011-07-15 12:23 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch (7.62 KB, patch)
2011-07-15 13:24 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-07-14 09:13:20 PDT
To reproduce:

1. new-run-webkit-tests

You'll see this:

Starting HTTP server ...Traceback (most recent call last):
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 433, in <module>
    sys.exit(main())
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 428, in main
    return run(port, options, args)
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 107, in run
    num_unexpected_results = manager.run(result_summary)
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 874, in run
    interrupted, keyboard_interrupted, thread_timings, test_timings, individual_test_timings = self._run_tests(self._test_files_list, result_summary)
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 723, in _run_tests
    self.start_servers_with_lock()
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 936, in start_servers_with_lock
    self._port.start_http_server()
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/port/base.py", line 667, in start_http_server
    server = apache_http_server.LayoutTestApacheHttpd(self, self.results_directory())
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py", line 79, in __init__
    '-f', "\"%s\"" % self._get_apache_config_file_path(test_dir, output_dir),
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py", line 167, in _get_apache_config_file_path
    cygusr = self._port_obj._path_from_base('third_party', 'cygwin', 'usr')
AttributeError: 'WinPort' object has no attribute '_path_from_base'

I think this is happening because apache_http_server.py has a whole bunch of code that assumes Chromium is the only port that uses Cygwin or Windows.
Comment 1 Adam Roben (:aroben) 2011-07-14 11:58:49 PDT
The last time we talked about this (2 years ago?) I think we discussed ripping out all the Chromium/Win support in this file, since Chromium uses LigHTTPD on Windows.
Comment 2 Eric Seidel (no email) 2011-07-14 12:02:40 PDT
Sounds like a great idea to me!  I'm busy with other NRWT bugs atm, but I'll get to this one eventually if no one else does.
Comment 3 Ojan Vafai 2011-07-14 12:21:36 PDT
(In reply to comment #1)
> The last time we talked about this (2 years ago?) I think we discussed ripping out all the Chromium/Win support in this file, since Chromium uses LigHTTPD on Windows.

Yeah. I think that's probably the right thing to do. Eventually, I think Chromium will want to move Windows back to using Apache, but in the absence of someone willing to drive that effort, we shouldn't block other work on it.
Comment 4 Dirk Pranke 2011-07-14 12:45:37 PDT
Even if Chromium ever does get around to using apache2 on Windows, it probably would make more sense for it to be the Win32 apache, in which case I bet most of that code would need to get rewritten anyway.
Comment 5 Eric Seidel (no email) 2011-07-15 12:23:00 PDT
Created attachment 101024 [details]
Patch
Comment 6 Adam Roben (:aroben) 2011-07-15 12:26:14 PDT
Comment on attachment 101024 [details]
Patch

I think there's more code that can be removed. All uses of _cygwin_safe_join can be replaced with os.path.join, and all calls to _get_cygwin_path should be removed.
Comment 7 Adam Roben (:aroben) 2011-07-15 12:27:30 PDT
To put it more succinctly: We should change _is_cygwin to always return false, and then perform dead-code elimination. _is_cygwin really means "we're using Apache Cygwin but Win32 Python", which is not the case for Apple's Windows port.
Comment 8 Eric Seidel (no email) 2011-07-15 13:24:36 PDT
Created attachment 101035 [details]
Patch
Comment 9 Eric Seidel (no email) 2011-07-15 13:25:13 PDT
Here is a second (more agressive) attempt per Adam's suggestion.
Comment 10 WebKit Review Bot 2011-07-15 15:40:22 PDT
Comment on attachment 101035 [details]
Patch

Clearing flags on attachment: 101035

Committed r91121: <http://trac.webkit.org/changeset/91121>
Comment 11 WebKit Review Bot 2011-07-15 15:40:27 PDT
All reviewed patches have been landed.  Closing bug.