Compare commits

...

1 Commits

Author SHA1 Message Date
Matthias Clasen
4847666a12 build: Add a build-internal-tests option
Internal tests link against the static library,
which takes a *long* time. Making it possible
to run only the public api tests is good for
faster turnaround times.
2021-09-14 11:36:02 -04:00
4 changed files with 88 additions and 79 deletions

View File

@@ -119,6 +119,11 @@ option('build-tests',
value: 'true',
description : 'Build tests')
option('build-internal-tests',
type: 'boolean',
value: 'true',
description : 'Build tests for internal apis')
option('install-tests',
type: 'boolean',
value: 'false',

View File

@@ -30,6 +30,7 @@ test('api', test_api,
suite: 'css',
)
if get_option('build-internal-tests')
test_data = executable('data', 'data.c',
c_args: common_cflags,
include_directories: [confinc, ],
@@ -58,6 +59,7 @@ test('transition', transition,
env: csstest_env,
suite: 'css'
)
endif
if get_option('install-tests')
conf = configuration_data()

View File

@@ -239,6 +239,7 @@ internal_tests = [
[ 'half-float' ],
]
if get_option('build-internal-tests')
foreach t : internal_tests
test_name = t.get(0)
test_srcs = ['@0@.c'.format(test_name)] + t.get(1, [])
@@ -265,5 +266,4 @@ foreach t : internal_tests
suite: 'gsk',
)
endforeach
endif

View File

@@ -190,6 +190,7 @@ foreach t : tests
)
endforeach
if get_option('build-internal-tests')
foreach t : internal_tests
test_name = t.get('name')
test_srcs = ['@0@.c'.format(test_name)] + t.get('sources', [])
@@ -222,6 +223,7 @@ foreach t : internal_tests
should_fail: expect_fail,
)
endforeach
endif
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
if add_languages('cpp', required: false, native: false)