Bug 111509

Summary: [chromium] making DumpRenderTree_resources a separate bundle breaks xcode
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: New BugsAssignee: Dirk Pranke <dpranke>
Severity: Normal CC: jamesr, thakis, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 111508    
Description Flags
Patch none

Description Dirk Pranke 2013-03-05 19:07:29 PST
[chromium] making DumpRenderTree_resources a separate bundle breaks xcode
Comment 1 Dirk Pranke 2013-03-05 19:08:23 PST
Created attachment 191637 [details]
Comment 2 Dirk Pranke 2013-03-05 19:09:14 PST
Committed r144866: <http://trac.webkit.org/changeset/144866>
Comment 3 Dirk Pranke 2013-03-05 19:11:45 PST
See the preceding patch in bug 111504 / r144863 .

Nico, what's the right thing to do here?
Comment 4 Dirk Pranke 2013-03-05 19:27:55 PST
argh ... I didn't actually comment out the line. Fixing.
Comment 5 Dirk Pranke 2013-03-05 19:29:24 PST
Reopening to attach new patch.
Comment 6 Dirk Pranke 2013-03-05 19:29:25 PST
Created attachment 191639 [details]
Comment 7 Dirk Pranke 2013-03-05 19:29:46 PST
Committed r144867: <http://trac.webkit.org/changeset/144867>
Comment 8 Dirk Pranke 2013-03-05 19:30:25 PST
leaving open until nico can weigh in or I revert it (and nico can still weigh in).
Comment 9 Nico Weber 2013-03-05 22:14:21 PST
Comment on attachment 191639 [details]

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

> Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:396
> +                # 'process_outputs_as_mac_bundle_resources': 1,

If it's not enabled, the repacked resources probably aren't copied into the DumpRenderTree.app bundle, right?

On my system:

$ find out/Release/DumpRenderTree.app -name '*.pak'

If you do `rm -rf out/Release/DumpRenderTree.app; ninja -C out/Release DumpRenderTree` and run the above find again, I'm guessing the pak file won't be found any more (which probably means resources won't load).

You might not see this immediately if you use ninja because it doesn't remove resource files from produced bundles, but if you blow away the .app before rebuilding it should be just as visible with ninja as it is with xcode.
Comment 10 Tony Chang 2013-03-06 09:55:00 PST
I think there are a couple options here.  We could either add:

['OS=="mac"', {
  'all_dependent_settings': {
    'mac_bundle_resources': [

Like we have in TestRunner_resources or we could inline DumpRenderTree_resources into the DumpRenderTree target and uncomment the 'process_outputs_as_mac_bundle_resources':1 line.  The former might be better so we can fix bug 111508, but I haven't tested it.
Comment 11 Tony Chang 2013-03-06 11:33:32 PST
Created attachment 191802 [details]
Comment 12 Tony Chang 2013-03-06 11:39:48 PST
Here's my try job: http://build.chromium.org/p/tryserver.chromium/builders/mac_layout_rel/builds/1167

If you click on compile and search for DumpRenderTree.pak, you can see it being copied into DumpRenderTree.app:

CpResource ../../../../../xcodebuild/Release/DumpRenderTree.pak ../../../../../xcodebuild/Release/DumpRenderTree.app/Contents/Resources/DumpRenderTree.pak
    cd /Volumes/data/b/build/slave/mac_layout/build/src/third_party/WebKit/Tools/DumpRenderTree/DumpRenderTree.gyp
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -resolve-src-symlinks /Volumes/data/b/build/slave/mac_layout/build/src/third_party/WebKit/Tools/DumpRenderTree/DumpRenderTree.gyp/../../../../../xcodebuild/Release/DumpRenderTree.pak /Volumes/data/b/build/slave/mac_layout/build/src/third_party/WebKit/Tools/DumpRenderTree/DumpRenderTree.gyp/../../../../../xcodebuild/Release/DumpRenderTree.app/Contents/Resources
Comment 13 Dirk Pranke 2013-03-06 12:41:05 PST
Comment on attachment 191802 [details]

This seems like the right way to do things. Nice!
Comment 14 WebKit Review Bot 2013-03-06 12:47:39 PST
Comment on attachment 191802 [details]

Clearing flags on attachment: 191802

Committed r144966: <http://trac.webkit.org/changeset/144966>
Comment 15 WebKit Review Bot 2013-03-06 12:47:43 PST
All reviewed patches have been landed.  Closing bug.