<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>284502</bug_id>
          
          <creation_ts>2024-12-11 19:06:58 -0800</creation_ts>
          <short_desc>REGRESSION(265294@main): [GTK][WPE] WTR is unable to find the fonts.conf file if the top-level compile-time and run-time directories are different</short_desc>
          <delta_ts>2024-12-12 05:10:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=258202</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>vitaly</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2081035</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-12-11 19:06:58 -0800</bug_when>
    <thetext>This has been detected on some downstream bots that I&apos;m testing were we don&apos;t use flatpak.

It happens that we hardcode at build-time the path to the webkit top level dir as a compiler definition (TOP_LEVEL_DIR) and then we use that to find the fonts.conf file at TOP_LEVEL_DIR/Tools/WebKitTestRunner/glib/fonts/fonts.conf

The problem happens when we use that compilation on another checkout of webkit that has a different path.

Example:

bot1 -&gt; Builds WebKit at /home/bot1/WebKit and hardcodes TOP_LEVEL_DIR as /home/bot1/WebKit
bot2 -&gt; Downloads built-product from bot1 at /home/bot2/WebKit and tries to run layout tests. Then it will try to access font.conf file at /home/bot1/WebKit/Tools/WebKitTestRunner/glib/fonts/fonts.conf but that path is invalid on this bot.


This was working before 265294@main because we were using relative paths.

It is fine using absolute path, but we have to detect the path at run-time rather than rely only on the path that was used at compile-time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2081038</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-12-11 19:08:43 -0800</bug_when>
    <thetext>With flatpak this is not an issue because inside the flatpak env everyone gets the same working dir at /app</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2081041</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-12-11 19:30:10 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/37814</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2081117</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-12-12 05:10:09 -0800</bug_when>
    <thetext>Committed 287735@main (d8bd0466a815): &lt;https://commits.webkit.org/287735@main&gt;

Reviewed commits have been landed. Closing PR #37814 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>