[build] Change how platform shaper tests are enable
Run the tests unconditionally and skip if the shaper is not available. This fixes distcheck (https://github.com/harfbuzz/harfbuzz/pull/3504) and shows SKIP for these tests instead of ignoring them.
This commit is contained in:
parent
38575c9042
commit
f76ffa8374
|
@ -14,10 +14,18 @@ EXTRA_DIST = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
TEST_EXTENSIONS = .tests
|
TEST_EXTENSIONS = .tests
|
||||||
|
TESTS_ENVIRONMENT =
|
||||||
if HAVE_FREETYPE
|
if HAVE_FREETYPE
|
||||||
TESTS_ENVIRONMENT = HAVE_FREETYPE=1
|
TESTS_ENVIRONMENT += HAVE_FREETYPE=1
|
||||||
else
|
endif
|
||||||
TESTS_ENVIRONMENT = HAVE_FREETYPE=0
|
if HAVE_CORETEXT
|
||||||
|
TESTS_ENVIRONMENT += HAVE_CORETEXT=1
|
||||||
|
endif
|
||||||
|
if HAVE_DIRECTWRITE
|
||||||
|
TESTS_ENVIRONMENT += HAVE_DIRECTWRITE=1
|
||||||
|
endif
|
||||||
|
if HAVE_UNISCRIBE
|
||||||
|
TESTS_ENVIRONMENT += HAVE_UNISCRIBE=1
|
||||||
endif
|
endif
|
||||||
TESTS_LOG_COMPILER = $(srcdir)/../../run-tests.py $(top_builddir)/util/hb-shape$(EXEEXT)
|
TESTS_LOG_COMPILER = $(srcdir)/../../run-tests.py $(top_builddir)/util/hb-shape$(EXEEXT)
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,11 @@ TESTS = \
|
||||||
tests/collections.tests \
|
tests/collections.tests \
|
||||||
tests/color-fonts.tests \
|
tests/color-fonts.tests \
|
||||||
tests/context-matching.tests \
|
tests/context-matching.tests \
|
||||||
|
tests/coretext.tests \
|
||||||
tests/cursive-positioning.tests \
|
tests/cursive-positioning.tests \
|
||||||
tests/default-ignorables.tests \
|
tests/default-ignorables.tests \
|
||||||
tests/digits.tests \
|
tests/digits.tests \
|
||||||
|
tests/directwrite.tests \
|
||||||
tests/emoji.tests \
|
tests/emoji.tests \
|
||||||
tests/emoji-clusters.tests \
|
tests/emoji-clusters.tests \
|
||||||
tests/fallback-positioning.tests \
|
tests/fallback-positioning.tests \
|
||||||
|
@ -59,6 +61,7 @@ TESTS = \
|
||||||
tests/tibetan-contractions-2.tests \
|
tests/tibetan-contractions-2.tests \
|
||||||
tests/tibetan-vowels.tests \
|
tests/tibetan-vowels.tests \
|
||||||
tests/tt-kern-gpos.tests \
|
tests/tt-kern-gpos.tests \
|
||||||
|
tests/uniscribe.tests \
|
||||||
tests/unsafe-to-concat.tests \
|
tests/unsafe-to-concat.tests \
|
||||||
tests/use-indic3.tests \
|
tests/use-indic3.tests \
|
||||||
tests/use-marchen.tests \
|
tests/use-marchen.tests \
|
||||||
|
@ -71,15 +74,5 @@ TESTS = \
|
||||||
tests/zero-width-marks.tests \
|
tests/zero-width-marks.tests \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if HAVE_CORETEXT
|
|
||||||
TESTS += tests/coretext.tests
|
|
||||||
endif
|
|
||||||
if HAVE_DIRECTWRITE
|
|
||||||
TESTS += tests/directwrite.tests
|
|
||||||
endif
|
|
||||||
if HAVE_UNISCRIBE
|
|
||||||
TESTS += tests/uniscribe.tests
|
|
||||||
endif
|
|
||||||
|
|
||||||
DISABLED_TESTS = \
|
DISABLED_TESTS = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
in_house_tests_base = [
|
in_house_tests = [
|
||||||
'aat-morx.tests',
|
'aat-morx.tests',
|
||||||
'aat-trak.tests',
|
'aat-trak.tests',
|
||||||
'arabic-fallback-shaping.tests',
|
'arabic-fallback-shaping.tests',
|
||||||
|
@ -13,9 +13,11 @@ in_house_tests_base = [
|
||||||
'collections.tests',
|
'collections.tests',
|
||||||
'color-fonts.tests',
|
'color-fonts.tests',
|
||||||
'context-matching.tests',
|
'context-matching.tests',
|
||||||
|
'coretext.tests',
|
||||||
'cursive-positioning.tests',
|
'cursive-positioning.tests',
|
||||||
'default-ignorables.tests',
|
'default-ignorables.tests',
|
||||||
'digits.tests',
|
'digits.tests',
|
||||||
|
'directwrite.tests',
|
||||||
'emoji.tests',
|
'emoji.tests',
|
||||||
'emoji-clusters.tests',
|
'emoji-clusters.tests',
|
||||||
'fallback-positioning.tests',
|
'fallback-positioning.tests',
|
||||||
|
@ -59,6 +61,7 @@ in_house_tests_base = [
|
||||||
'tibetan-contractions-2.tests',
|
'tibetan-contractions-2.tests',
|
||||||
'tibetan-vowels.tests',
|
'tibetan-vowels.tests',
|
||||||
'tt-kern-gpos.tests',
|
'tt-kern-gpos.tests',
|
||||||
|
'uniscribe.tests',
|
||||||
'unsafe-to-concat.tests',
|
'unsafe-to-concat.tests',
|
||||||
'use-indic3.tests',
|
'use-indic3.tests',
|
||||||
'use-marchen.tests',
|
'use-marchen.tests',
|
||||||
|
@ -70,15 +73,3 @@ in_house_tests_base = [
|
||||||
'vertical.tests',
|
'vertical.tests',
|
||||||
'zero-width-marks.tests',
|
'zero-width-marks.tests',
|
||||||
]
|
]
|
||||||
|
|
||||||
in_house_tests_coretext = [
|
|
||||||
'coretext.tests',
|
|
||||||
]
|
|
||||||
|
|
||||||
in_house_tests_uniscribe = [
|
|
||||||
'uniscribe.tests',
|
|
||||||
]
|
|
||||||
|
|
||||||
in_house_tests_directwrite = [
|
|
||||||
'directwrite.tests',
|
|
||||||
]
|
|
||||||
|
|
|
@ -7,17 +7,9 @@ shape_run_tests_py = find_program('run-tests.py')
|
||||||
|
|
||||||
env = environment()
|
env = environment()
|
||||||
env.set('HAVE_FREETYPE', '@0@'.format(conf.get('HAVE_FREETYPE', 0)))
|
env.set('HAVE_FREETYPE', '@0@'.format(conf.get('HAVE_FREETYPE', 0)))
|
||||||
|
env.set('HAVE_CORETEXT', '@0@'.format(conf.get('HAVE_CORETEXT', 0)))
|
||||||
in_house_tests = in_house_tests_base
|
env.set('HAVE_DIRECTWRITE', '@0@'.format(conf.get('HAVE_DIRECTWRITE', 0)))
|
||||||
if conf.get('HAVE_CORETEXT', 0) == 1
|
env.set('HAVE_UNISCRIBE', '@0@'.format(conf.get('HAVE_UNISCRIBE', 0)))
|
||||||
in_house_tests += in_house_tests_coretext
|
|
||||||
endif
|
|
||||||
if conf.get('HAVE_UNISCRIBE', 0) == 1
|
|
||||||
in_house_tests += in_house_tests_uniscribe
|
|
||||||
endif
|
|
||||||
if conf.get('HAVE_DIRECTWRITE', 0) == 1
|
|
||||||
in_house_tests += in_house_tests_directwrite
|
|
||||||
endif
|
|
||||||
|
|
||||||
foreach file_name : in_house_tests
|
foreach file_name : in_house_tests
|
||||||
test_name = file_name.split('.')[0]
|
test_name = file_name.split('.')[0]
|
||||||
|
|
|
@ -11,7 +11,10 @@ def shape_cmd(command):
|
||||||
|
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
have_freetype = bool(int(os.getenv ('HAVE_FREETYPE', '1')))
|
have_freetype = int(os.getenv ('HAVE_FREETYPE', 1))
|
||||||
|
have_coretext = int(os.getenv ('HAVE_CORETEXT', 0))
|
||||||
|
have_directwrite = int(os.getenv ('HAVE_DIRECTWRITE', 0))
|
||||||
|
have_uniscribe = int(os.getenv ('HAVE_UNISCRIBE', 0))
|
||||||
|
|
||||||
if not args or args[0].find('hb-shape') == -1 or not os.path.exists (args[0]):
|
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.""")
|
sys.exit ("""First argument does not seem to point to usable hb-shape.""")
|
||||||
|
@ -91,6 +94,18 @@ for filename in args:
|
||||||
skips += 1
|
skips += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if "--shaper=coretext" in options and not have_coretext:
|
||||||
|
skips += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
if "--shaper=directwrite" in options and not have_directwrite:
|
||||||
|
skips += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
if "--shaper=uniscribe" in options and not have_uniscribe:
|
||||||
|
skips += 1
|
||||||
|
continue
|
||||||
|
|
||||||
if "--font-funcs=ot" in options or not have_freetype:
|
if "--font-funcs=ot" in options or not have_freetype:
|
||||||
glyphs1 = shape_cmd ([fontfile, "--font-funcs=ot"] + extra_options + ["--unicodes", unicodes] + options)
|
glyphs1 = shape_cmd ([fontfile, "--font-funcs=ot"] + extra_options + ["--unicodes", unicodes] + options)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue