Bug 145582 - streamline benchmark-runner browser
Summary: streamline benchmark-runner browser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 144842
  Show dependency treegraph
 
Reported: 2015-06-02 17:50 PDT by Stephanie Lewis
Modified: 2015-06-05 02:53 PDT (History)
5 users (show)

See Also:


Attachments
patch (5.75 KB, patch)
2015-06-02 17:50 PDT, Stephanie Lewis
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephanie Lewis 2015-06-02 17:50:10 PDT
Created attachment 254127 [details]
patch

Some minor changes to benchmark-runner browser.

Add Caffeinated
Don't block on getting output.
Use system safari as default.
Add xpc dyld path.
Comment 1 WebKit Commit Bot 2015-06-02 17:53:09 PDT
Attachment 254127 [details] did not pass style-queue:


ERROR: Tools/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 Ryosuke Niwa 2015-06-02 18:06:11 PDT
Comment on attachment 254127 [details]
patch

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

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:32
> +        process = subprocess.Popen(['open', '-a', appPath] + args)
> +        cls.launchCaffeinateForProcess(process.pid)

Instead of having a helper function to launch caffinate, why don't we add a method e.g. launchProcessWithCaffinate that launches both the target process and caffeinate?

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:43
> +        subprocess.Popen(["/usr/bin/caffeinate", "-disw", str(pid)])

Does caffeinate automatically terminate?

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:39
> +        self.safariProcess = subprocess.Popen(args, env=env)
> +
> +        OSXSafariDriver.launchCaffeinateForProcess(self.safariProcess.pid)

That way, we can just call that function instead of Popen'ing and calling a separate helper function.
Comment 3 Stephanie Lewis 2015-06-02 18:08:38 PDT
(In reply to comment #2)
> Comment on attachment 254127 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=254127&action=review
> 
> > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:32
> > +        process = subprocess.Popen(['open', '-a', appPath] + args)
> > +        cls.launchCaffeinateForProcess(process.pid)
> 
> Instead of having a helper function to launch caffinate, why don't we add a
> method e.g. launchProcessWithCaffinate that launches both the target process
> and caffeinate?
> 
> > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:43
> > +        subprocess.Popen(["/usr/bin/caffeinate", "-disw", str(pid)])
> 
> Does caffeinate automatically terminate?

Yeah Caffeinate takes the pid of a process to watch and terminates when the process terminates.

> 
> > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:39
> > +        self.safariProcess = subprocess.Popen(args, env=env)
> > +
> > +        OSXSafariDriver.launchCaffeinateForProcess(self.safariProcess.pid)
> 
> That way, we can just call that function instead of Popen'ing and calling a
> separate helper function.
Comment 4 Stephanie Lewis 2015-06-05 02:53:03 PDT
Committed http://trac.webkit.org/changeset/185242