[Fontconfig-bugs] [Bug 93075] New: Possible fix for make check failure on msys/MinGW...

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 22 18:53:44 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=93075

            Bug ID: 93075
           Summary: Possible fix for make check failure on msys/MinGW...
           Product: fontconfig
           Version: 2.11
          Hardware: x86 (IA32)
                OS: Windows (All)
            Status: NEW
          Severity: minor
          Priority: medium
         Component: library
          Assignee: fontconfig-bugs at lists.freedesktop.org
          Reporter: cfaf at hotmail.com
        QA Contact: freedesktop at behdad.org

Created attachment 120044
  --> https://bugs.freedesktop.org/attachment.cgi?id=120044&action=edit
patch for test/run-test.sh

make check fail on msys/mingw,

=============================================
   fontconfig 2.11.94: test/test-suite.log
=============================================

# TOTAL: 2
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: run-test
==============

*** Test failed: Basic check
*** output is in 'out', expected output in 'out.expected'
FAIL run-test.sh (exit status: 1)

FAIL: test-bz89617
==================

Fontconfig error: Cannot load default config fileFontconfig error: Cannot load
default config fileFAIL test-bz89617.exe (exit status: 1)


Here's why.

All the program in the msys distribution are built against msys-1.0.dll which,
among other things, translate paths between unix and windows style.
That allows the autotool's generated files like configure,
to be used to build native windows applications with the mingw compiler.

In fontconfig's test suite, the first program that fails is run-test.sh,
a shell script that use the pwd command to retrieve
a unix style current working directory, which is then used to generate a
configuration file for fc-list and fc-scan.
fc-list and fc-scan are native windows program and doesn't know how to handle
unix paths.

Fortunately, msys's pwd has a special '-W' option which print the path in
windows style.
And the "$OSTYPE" environment variable can be checked to detect when the script
is run on msys.



Now for test-bz89617 i would like to fix it too but,
but i don't know what is it supposed to test exactly ?

Wouldn't it be better to call FcConfigCreate() instead of FcConfigGetCurrent()
?

int
main (void)
{
    FcConfig *config = FcConfigCreate ();

    if (!FcConfigAppFontAddFile (config, SRCDIR "/4x6.pcf") ||
    FcConfigAppFontAddFile (config, "/dev/null"))
    return 1;

    return 0;
}

I tried it and it works but i don't know if it divert from the original goal of
the test.

I'm sending a patch for run-test.sh.
If you're happy with it could you please commit it to the future releases?

Thanks
Christian Fafard

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20151123/f5652f13/attachment.html>


More information about the Fontconfig-bugs mailing list