Bug 135624 - [iOS] Run ImageDiff in the sim bootstrap
Summary: [iOS] Run ImageDiff in the sim bootstrap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: David Farler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 15:14 PDT by David Farler
Modified: 2014-08-05 18:40 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2014-08-05 15:20 PDT, David Farler
ddkilzer: review+
Details | Formatted Diff | Diff
Patch (3.29 KB, patch)
2014-08-05 15:29 PDT, David Farler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Farler 2014-08-05 15:14:14 PDT
Previously, I tried to use ImageDiff on OS X without trying to go through the sim bootstrap. However, ImageDiff relies on some WTF functionality and I don't want to introduce a new OS X build dependency when testing iOS. I've verified that running ImageDiff in the sim bootstrap is negligible, so we can create a custom ImageDiffer and use that for the iso-simulator platform. With this change, the only OS X tool that you'll need to build is the LayoutTestRelay: there are no WebKit dependencies there and it builds automatically when running layout tests.
Comment 1 David Farler 2014-08-05 15:20:52 PDT
Created attachment 236050 [details]
Patch
Comment 2 David Farler 2014-08-05 15:29:41 PDT
Created attachment 236054 [details]
Patch
Comment 3 David Farler 2014-08-05 15:37:06 PDT
Sorry - uploaded a different patch to the same bug - reinstated original.
Comment 4 Simon Fraser (smfr) 2014-08-05 17:34:57 PDT
What does it mean to "run in the bootstrap"? Do you mean run in the simulated device?
Comment 5 David Farler 2014-08-05 17:52:10 PDT
Sort of, although not in a real SimDevice. It’s just wrapped in `xcrun -sdk iphonesimulator sim`. It has the bare minimum bootstrap to run a simulator binary but doesn’t have access to to other simulator services like the framebuffer, etc. It works in this case because it’s not a full UIKit application.
Comment 6 David Kilzer (:ddkilzer) 2014-08-05 18:29:33 PDT
(In reply to comment #4)
> What does it mean to "run in the bootstrap"? Do you mean run in the simulated device?

It means that ImageDiff runs in the simulator environment, but not as an app in SpringBoard.

In other words, it uses simulator frameworks instead of Mac OS X frameworks to run on the command line.
Comment 7 David Kilzer (:ddkilzer) 2014-08-05 18:35:18 PDT
Comment on attachment 236050 [details]
Patch

r=me
Comment 8 David Farler 2014-08-05 18:40:15 PDT
Committed r172118: <http://trac.webkit.org/changeset/172118>