Bug 153993 - [GTK] Allow to run the WebKitGTK+ MiniBrowser with the run-benchmark script.
Summary: [GTK] Allow to run the WebKitGTK+ MiniBrowser with the run-benchmark script.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks: 154595
  Show dependency treegraph
 
Reported: 2016-02-08 10:53 PST by Carlos Alberto Lopez Perez
Modified: 2016-02-26 22:19 PST (History)
9 users (show)

See Also:


Attachments
Patch (14.05 KB, patch)
2016-02-23 07:09 PST, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2016-02-08 10:53:12 PST
As stated on https://lists.webkit.org/pipermail/webkit-dev/2016-February/027948.html we would like to implement support on the run-benchmark script to execute the tests also with the WebKitGTK+ MiniBrowser.
Comment 1 Carlos Alberto Lopez Perez 2016-02-23 07:09:58 PST
Created attachment 272015 [details]
Patch
Comment 2 WebKit Commit Bot 2016-02-23 07:11:43 PST
Attachment 272015 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:89:  [SimpleHTTPServerDriver.kill_server] Instance of 'Popen' has no 'terminate' member  [pylint/E1101] [5]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Carlos Garcia Campos 2016-02-23 08:44:23 PST
Comment on attachment 272015 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=272015&action=review

Thanks for the patch!

> Tools/MiniBrowser/gtk/main.c:43
> +static char *geometry = NULL;

This doesn't need to be initialized, since all those statics are already 0 initialized.

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py:45
> +        args.append("%s" % url)

I guess this could just be args.append(url)

> Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:88
> +            if self._server_process.poll() == None:

is None

> Tools/Scripts/webkitpy/benchmark_runner/utils.py:28
> +    filelist = os.listdir(dirname)
> +    filelist.remove(base_class_file)
> +    filelist.insert(0, base_class_file)
> +    for filename in filelist:
>          if not filename.endswith('.py') or filename in ['__init__.py']:
>              continue
>          module_name = filename[:-3]

I think this could be simplified as something like this:

filelist = [base_class_file] + [f for f in os.listdir(dirname) if f.endswith('.py') and f not in ['__init__.py', base_class_file]]
for filename in filelist:
    module_name = os.path.splitext(filename)[0]
Comment 4 Carlos Alberto Lopez Perez 2016-02-23 09:38:42 PST
Committed r196979: <http://trac.webkit.org/changeset/196979>
Comment 5 Carlos Alberto Lopez Perez 2016-02-23 09:44:29 PST
Comment on attachment 272015 [details]
Patch

Clearing flags
Comment 6 Michael Catanzaro 2016-02-26 22:19:10 PST
Committed r197241: <http://trac.webkit.org/changeset/197241>