Bug 136477 - [GTK] run-webkit-test check for jhBuild is not correct
Summary: [GTK] run-webkit-test check for jhBuild is not correct
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-03 02:01 PDT by Fabien Vallée
Modified: 2014-09-10 00:11 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.73 KB, patch)
2014-09-03 02:29 PDT, Fabien Vallée
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Vallée 2014-09-03 02:01:45 PDT
Tools/Scripts/webkitpy/port/gtk.py is checking if tests must be run within jhBuild wrapper. 
If webkit/WebKitBuild/Dependencies exists, tests are run using jhBuild wrapper - it works fine using default configuration, however it has 2 issues:

1) WebKitBuild/Dependencies exists even if jhBuild is not used, because it is needed for fonts (as you can see in getFontsPath() method from http://trac.webkit.org/browser/trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp)
So a build using default WebKitBuild folder but NOT using jhBuild will be using jhBuild wrapper anyway (and jhBuild checkout during tests mess up everything).

2) build folder (default is webkit/WebKitBuild) can be overridden using WEBKIT_OUTPUTDIR env variable. In that case jhBuild is never detected and regression tests will fail (tests are using system libs instead of jhBuild)
Comment 1 Fabien Vallée 2014-09-03 02:29:56 PDT
Created attachment 237551 [details]
Patch
Comment 2 Philippe Normand 2014-09-03 03:06:30 PDT
(In reply to comment #0)
> Tools/Scripts/webkitpy/port/gtk.py is checking if tests must be run within jhBuild wrapper. 
> If webkit/WebKitBuild/Dependencies exists, tests are run using jhBuild wrapper - it works fine using default configuration, however it has 2 issues:
> 
> 1) WebKitBuild/Dependencies exists even if jhBuild is not used, because it is needed for fonts (as you can see in getFontsPath() method from http://trac.webkit.org/browser/trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp)
> So a build using default WebKitBuild folder but NOT using jhBuild will be using jhBuild wrapper anyway (and jhBuild checkout during tests mess up everything).
> 

But if you set WEBKIT_OUTPUTDIR and don't have Dependencies/ that function will look for fonts in WEBKIT_OUTPUTDIR, or am I misunderstanding that code?
Comment 3 Fabien Vallée 2014-09-03 05:14:49 PDT
You are 100% right. Fonts don't need to be in WebKitBuild/Dependencies anymore, so please forget 1).

(sorry for that. Got that issue long time ago because DumpRenderTree was printing error message "Could not locate test fonts at $WEBKIT_TOP_LEVEL/WebKitBuild/Dependencies/Root/webkitgtk-test-fonts", but WebKitTestRunner works fine w/ fonts directly in $WEBKIT_TOP_LEVEL/WebKitBuild or in $WEBKIT_OUTPUTDIR).

I will upload a new patch (first was not working anyway) for review with the WEBKIT_OUTPUTDIR check in gtk.py.
Comment 4 Fabien Vallée 2014-09-03 05:28:41 PDT
bug can be closed. Issue has been fixed already
http://trac.webkit.org/changeset/172830

(os.path.exists(self.path_from_webkit_base('WebKitBuild', 'Dependencies')): has been replaced by self._should_use_jhbuild())
Comment 5 Philippe Normand 2014-09-10 00:11:58 PDT
Comment on attachment 237551 [details]
Patch

Removing patch from review queue