Fix a test failure with freetype 2.7: https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 Patch copied from upstream source repository: https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 From a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 29 Jan 2017 17:07:50 +0100 Subject: [PATCH] Fix #302: Test suite fails with freetype 2.7 Actually, the test failures are not necessarily related to freetype 2.7, but rather are caused by subpixel hinting which is enabled by default in freetype 2.7. Subpixel hinting is, however, already available in freetype 2.5 and in versions having the "Infinality" patch. To get the expected results in all environments, we have to disable subpixel hinting, what is easily done by setting a respective environment variable. See also: * https://www.freetype.org/freetype2/docs/subpixel-hinting.html * https://www.freetype.org/freetype2/docs/reference/ft2-tt_driver.html --- tests/freetype/bug00132.c | 3 +++ tests/gdimagestringft/gdimagestringft_bbox.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/freetype/bug00132.c b/tests/freetype/bug00132.c index 713dd2d..42ed5b1 100644 --- a/tests/freetype/bug00132.c +++ b/tests/freetype/bug00132.c @@ -11,6 +11,9 @@ int main() char *path; char *ret = NULL; + /* disable subpixel hinting */ + putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35"); + im = gdImageCreateTrueColor(50, 30); if (!im) { diff --git a/tests/gdimagestringft/gdimagestringft_bbox.c b/tests/gdimagestringft/gdimagestringft_bbox.c index 0161ec8..1596a9e 100644 --- a/tests/gdimagestringft/gdimagestringft_bbox.c +++ b/tests/gdimagestringft/gdimagestringft_bbox.c @@ -38,6 +38,9 @@ int main() int error = 0; FILE *fp; + /* disable subpixel hinting */ + putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35"); + path = gdTestFilePath("freetype/DejaVuSans.ttf"); im = gdImageCreate(800, 800); gdImageColorAllocate(im, 0xFF, 0xFF, 0xFF); /* allocate white for background color */ x/log/tests?id=d25a48768d18ee66be8acd453b9468bfae34158a'>tests/store-database.scm
AgeCommit message (Expand)Author
2018-07-20database: Reset timestamps to one second after the Epoch....Previously, store items registered in the database by this code (for instance, store items retrieved by 'guix offload' and passed to 'restore-file-set') would have an mtime of 0 instead of 1. This would cause problems for things like .go files: Guile would consider them to be older than the corresponding .scm file, and consequently it would ignore them and possibly use another (incorrect) .go file. Reported by Ricardo Wurmus. * guix/store/database.scm (reset-timestamps): Pass 1, not 0, to 'utime'. * tests/store-database.scm ("register-path"): Check the mtime of FILE and REF. Ludovic Courtès
2018-06-14store: Remove 'register-path'....* guix/store.scm (register-path): Remove. * guix/nar.scm: Use (guix store database). * guix/scripts/system.scm: Likewise. * tests/store-database.scm: Remove #:hide (register-path). * tests/store.scm ("register-path"): Remove. Ludovic Courtès
2018-06-14database: 'sqlite-register' takes a database, not a file name....* guix/store/database.scm (sqlite-register): Remove #:db-file and add 'db' parameter. Remove #:schema and 'parameterize'. (register-path): Wrap 'sqlite-register' call in 'with-database' and in 'parameterize'. * tests/store-database.scm ("new database") ("register-path with unregistered references"): Adjust accordingly. Ludovic Courtès
2018-06-14database: Fail registration when encountering unregistered references....* guix/store/database.scm (add-reference-sql): Remove nested SELECT. (add-references): Expect REFERENCES to be a list of ids. (sqlite-register): Call 'path-id' for each of REFERENCES and pass it to 'add-references'. * tests/store-database.scm ("register-path with unregistered references"): New test. Ludovic Courtès
2018-06-14database: 'with-database' can now initialize new databases....* nix/libstore/schema.sql: Rename to... * guix/store/schema.sql: ... this. * Makefile.am (nobase_dist_guilemodule_DATA): Add it. * nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly. * guix/store/database.scm (sql-schema): New variable. (sqlite-exec, initialize-database, call-with-database): New procedures. (with-database): Rewrite in terms of 'call-with-database'. * tests/store-database.scm ("new database"): New test. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to #:extra-files. Ludovic Courtès
2018-06-01Add (gnu store database)....* guix/config.scm.in (%store-database-directory): New variable. * guix/store/database.scm: New file. * tests/store-database.scm: New file. * Makefile.am (STORE_MODULES): New variable. (MODULES, MODULES_NOT_COMPILED): Adjust accordingly. (SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add tests/store-database.scm. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Caleb Ristvedt