Merge branch 'test_build' into 'master'
tests: Compile in advance See merge request Librem5/squeekboard!189
This commit is contained in:
@ -61,10 +61,26 @@ rslibs = custom_target(
|
|||||||
command: [cargo_script, '@OUTPUT@', 'build']
|
command: [cargo_script, '@OUTPUT@', 'build']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
build_rstests = custom_target(
|
||||||
|
'build_rstests',
|
||||||
|
build_by_default: false,
|
||||||
|
# HACK: this target needs to build before all the tests,
|
||||||
|
# but it doesn't produce anything stable.
|
||||||
|
# Declaring build_by_default with some random but irrelevant output
|
||||||
|
# ensures that it's always built as it should
|
||||||
|
build_always_stale: true,
|
||||||
|
output: ['src'],
|
||||||
|
install: false,
|
||||||
|
console: true,
|
||||||
|
command: [cargo_script, '', 'build', '--tests'],
|
||||||
|
depends: rslibs, # no point building tests if the code itself fails
|
||||||
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'rstest',
|
'rstest',
|
||||||
cargo_script,
|
cargo_script,
|
||||||
args: ['', 'test']
|
args: ['', 'test'],
|
||||||
|
depends: build_rstests,
|
||||||
)
|
)
|
||||||
|
|
||||||
libsqueekboard = static_library('libsqueekboard',
|
libsqueekboard = static_library('libsqueekboard',
|
||||||
|
|||||||
Reference in New Issue
Block a user