diff --git a/test/shaping/data/aots/Makefile.am b/test/shaping/data/aots/Makefile.am index 543448f0b..6b71d893b 100644 --- a/test/shaping/data/aots/Makefile.am +++ b/test/shaping/data/aots/Makefile.am @@ -15,6 +15,11 @@ EXTRA_DIST = \ $(NULL) TEST_EXTENSIONS = .tests +if HAVE_FREETYPE +TESTS_ENVIRONMENT = HAVE_FREETYPE=1 +else +TESTS_ENVIRONMENT = HAVE_FREETYPE=0 +endif TESTS_LOG_COMPILER = $(srcdir)/../../run-tests.py $(top_builddir)/util/hb-shape$(EXEEXT) include Makefile.sources diff --git a/test/shaping/data/in-house/Makefile.am b/test/shaping/data/in-house/Makefile.am index 15ac13c2f..a2845785e 100644 --- a/test/shaping/data/in-house/Makefile.am +++ b/test/shaping/data/in-house/Makefile.am @@ -14,6 +14,11 @@ EXTRA_DIST = \ $(NULL) TEST_EXTENSIONS = .tests +if HAVE_FREETYPE +TESTS_ENVIRONMENT = HAVE_FREETYPE=1 +else +TESTS_ENVIRONMENT = HAVE_FREETYPE=0 +endif TESTS_LOG_COMPILER = $(srcdir)/../../run-tests.py $(top_builddir)/util/hb-shape$(EXEEXT) include Makefile.sources diff --git a/test/shaping/data/text-rendering-tests/Makefile.am b/test/shaping/data/text-rendering-tests/Makefile.am index 17d7ba5d3..19ac3b3a0 100644 --- a/test/shaping/data/text-rendering-tests/Makefile.am +++ b/test/shaping/data/text-rendering-tests/Makefile.am @@ -20,6 +20,11 @@ EXTRA_DIST = \ $(NULL) TEST_EXTENSIONS = .tests +if HAVE_FREETYPE +TESTS_ENVIRONMENT = HAVE_FREETYPE=1 +else +TESTS_ENVIRONMENT = HAVE_FREETYPE=0 +endif TESTS_LOG_COMPILER = $(srcdir)/../../run-tests.py $(top_builddir)/util/hb-shape$(EXEEXT) include Makefile.sources diff --git a/test/shaping/meson.build b/test/shaping/meson.build index 0e2ee5b2a..ee74353a8 100644 --- a/test/shaping/meson.build +++ b/test/shaping/meson.build @@ -6,7 +6,7 @@ subdir('data/text-rendering-tests') # text_rendering_tests shaping_run_tests_py = find_program('run-tests.py') env = environment() -env.set('NO_FT_FUNCS', conf.get('HAVE_FREETYPE', 0) == 1 ? '0' : '1') +env.set('HAVE_FREETYPE', '@0@'.format(conf.get('HAVE_FREETYPE', 0))) foreach file_name : in_house_tests test_name = file_name.split('.')[0].underscorify() diff --git a/test/shaping/run-tests.py b/test/shaping/run-tests.py index 3cd74cc28..71d520f6b 100755 --- a/test/shaping/run-tests.py +++ b/test/shaping/run-tests.py @@ -15,7 +15,7 @@ if len (args) and args[0] == "--reference": reference = True args = args[1:] -no_ft_funcs = bool(int(os.getenv ('NO_FT_FUNCS', '0'))) +have_freetype = bool(int(os.getenv ('HAVE_FREETYPE', '1'))) if not args or args[0].find('hb-shape') == -1 or not os.path.exists (args[0]): sys.exit ("""First argument does not seem to point to usable hb-shape.""") @@ -103,11 +103,11 @@ for filename in args: shutil.copyfile(fontfile, new_fontfile) fontfile = new_fontfile - if "--font-funcs=ft" in options and no_ft_funcs: + if "--font-funcs=ft" in options and not have_freetype: skips += 1 continue - if "--font-funcs=ot" in options or no_ft_funcs: + if "--font-funcs=ot" in options or not have_freetype: glyphs1 = cmd ([hb_shape, "--font-funcs=ot", fontfile] + extra_options + ["--unicodes", unicodes] + options) else: glyphs1 = cmd ([hb_shape, "--font-funcs=ft", fontfile] + extra_options + ["--unicodes", unicodes] + options)