Add a CI test to make sure we can always link to fwupdplugin

Based on a patch from Simon McVittie on
https://salsa.debian.org/efi-team/fwupd/-/merge_requests/4

Suggested-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
Mario Limonciello 2021-01-21 13:02:59 -06:00 committed by Mario Limonciello
parent e95c1b3bd5
commit b543446fda
5 changed files with 52 additions and 0 deletions

View File

@ -37,6 +37,10 @@ pacman -Syu --noconfirm qt5-base
meson qt5-thread-test ../contrib/ci/qt5-thread-test meson qt5-thread-test ../contrib/ci/qt5-thread-test
ninja -C qt5-thread-test test ninja -C qt5-thread-test test
#run the CI tests for making sure we can link fwupd/fwupdplugin
meson out-of-tree-link ../contrib/ci/out-of-tree-link
ninja -C out-of-tree-link test
# move the package to working dir # move the package to working dir
mv *.pkg.* ../dist mv *.pkg.* ../dist

View File

@ -0,0 +1 @@
build

View File

@ -0,0 +1,10 @@
#undef NDEBUG
#include <assert.h>
#include <fwupd.h>
int main (void)
{
assert (fwupd_error_to_string (FWUPD_ERROR_NOTHING_TO_DO) != NULL);
return 0;
}

View File

@ -0,0 +1,10 @@
#undef NDEBUG
#include <assert.h>
#include <fwupdplugin.h>
int main (void)
{
assert (fu_common_vercmp_full ("1.0", "2.1", FWUPD_VERSION_FORMAT_NUMBER) < 0);
return 0;
}

View File

@ -0,0 +1,27 @@
project('out-of-tree-link', 'c',
license : 'LGPL-2.1+',
)
fwupd = dependency('fwupd')
fwupdplugin = dependency('fwupdplugin')
env = environment()
env.set('G_DEBUG', 'fatal-criticals')
e = executable(
'fwupd',
sources : [
'fwupd.c'
],
dependencies : [
fwupd
],
)
test('fwupd', e, timeout: 60, env: env)
e = executable(
'fwupdplugin',
sources : [
'fwupdplugin.c'
],
dependencies : [
fwupdplugin
],
)
test('fwupdplugin', e, timeout: 60, env: env)