Bug 208849 - [PlayStation] Enable TestWTF and TestWebCore
Summary: [PlayStation] Enable TestWTF and TestWebCore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yoshiaki Jitsukawa
URL:
Keywords: InRadar
Depends on:
Blocks: 191038
  Show dependency treegraph
 
Reported: 2020-03-10 00:33 PDT by Yoshiaki Jitsukawa
Modified: 2020-04-26 22:08 PDT (History)
11 users (show)

See Also:


Attachments
Patch (7.12 KB, patch)
2020-03-10 00:45 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff
Patch (7.04 KB, patch)
2020-03-10 21:43 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff
Patch (9.36 KB, patch)
2020-04-13 00:28 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff
Patch (9.60 KB, patch)
2020-04-26 19:19 PDT, Yoshiaki Jitsukawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshiaki Jitsukawa 2020-03-10 00:33:59 PDT
Make TestWTF and TestWebCore runnable.
Comment 1 Yoshiaki Jitsukawa 2020-03-10 00:45:11 PDT
Created attachment 393126 [details]
Patch
Comment 2 Stephan Szabo 2020-03-10 07:27:33 PDT
Comment on attachment 393126 [details]
Patch

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

> Source/cmake/OptionsPlayStation.cmake:7
> +set(PLAYSTATION_PLATFORM "playstation" CACHE STRING "PlayStation Platform")

It doesn't look like any of the bits using this value were brought over, so I don't think we need this now (yet).
Comment 3 Stephan Szabo 2020-03-10 12:23:12 PDT
Comment on attachment 393126 [details]
Patch

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

> Tools/TestWebKitAPI/PlatformPlayStation.cmake:32
> +    libcairo

How are the dependencies from libSceNKWebKitRequirements to these managed? Is libcairo included in it or merely that libSceNKWebKitRequirements is linked to the shared library?
Comment 4 Yoshiaki Jitsukawa 2020-03-10 21:29:27 PDT
(In reply to Stephan Szabo from comment #2)
> Comment on attachment 393126 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=393126&action=review
> 
> > Source/cmake/OptionsPlayStation.cmake:7
> > +set(PLAYSTATION_PLATFORM "playstation" CACHE STRING "PlayStation Platform")
> 
> It doesn't look like any of the bits using this value were brought over, so
> I don't think we need this now (yet).

OK, I'll remove it.
Comment 5 Yoshiaki Jitsukawa 2020-03-10 21:41:18 PDT
(In reply to Stephan Szabo from comment #3)
> Comment on attachment 393126 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=393126&action=review
> 
> > Tools/TestWebKitAPI/PlatformPlayStation.cmake:32
> > +    libcairo
> 
> How are the dependencies from libSceNKWebKitRequirements to these managed?
> Is libcairo included in it or merely that libSceNKWebKitRequirements is
> linked to the shared library?

When libcairo is included in libSceNKWebKitRequirements as a static library, then this line is simply ignored because this is no more than a hint to let WEBKIT_EXECUTABLE() to try to copy libcairo.sprx.
Comment 6 Yoshiaki Jitsukawa 2020-03-10 21:43:21 PDT
Created attachment 393205 [details]
Patch
Comment 7 Yoshiaki Jitsukawa 2020-04-13 00:28:36 PDT
Created attachment 396260 [details]
Patch
Comment 8 Don Olmstead 2020-04-23 14:48:39 PDT
Comment on attachment 396260 [details]
Patch

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

Overall looks good. Just have the one nit and its good to go.

> Tools/TestWebKitAPI/playstation/main.cpp:42
> +    dlopen("libicu", RTLD_NOW);
> +    dlopen("libpng16", RTLD_NOW);
> +    dlopen("libfontconfig", RTLD_NOW);
> +    dlopen("libfreetype", RTLD_NOW);
> +    dlopen("libharfbuzz", RTLD_NOW);
> +    dlopen("libcairo", RTLD_NOW);
> +    dlopen("libSceNKWebKitRequirements", RTLD_NOW);
> +    dlopen("libJavaScriptCore", RTLD_NOW);
> +    dlopen("libWebKit", RTLD_NOW);
> +    return TestWebKitAPI::TestsController::singleton().run(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE;

You should guard what shared objects it tries to load based on the test being run. Each executable should define BUILDING_${name} which you can use to only load the applicable libraries.
Comment 9 Yoshiaki Jitsukawa 2020-04-26 19:19:58 PDT
Created attachment 397641 [details]
Patch
Comment 10 Yoshiaki Jitsukawa 2020-04-26 19:24:00 PDT
(In reply to Don Olmstead from comment #8)
> You should guard what shared objects it tries to load based on the test
> being run. Each executable should define BUILDING_${name} which you can use
> to only load the applicable libraries.

BUILDING_TestWebKit/TestWebCore guards added. Thank you.
Comment 11 EWS 2020-04-26 22:07:44 PDT
Committed r260738: <https://trac.webkit.org/changeset/260738>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397641 [details].
Comment 12 Radar WebKit Bug Importer 2020-04-26 22:08:13 PDT
<rdar://problem/62426001>