mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 09:46:25 +00:00
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:
parent
e95c1b3bd5
commit
b543446fda
@ -37,6 +37,10 @@ pacman -Syu --noconfirm qt5-base
|
||||
meson qt5-thread-test ../contrib/ci/qt5-thread-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
|
||||
mv *.pkg.* ../dist
|
||||
|
||||
|
1
contrib/ci/out-of-tree-link/.gitignore
vendored
Normal file
1
contrib/ci/out-of-tree-link/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build
|
10
contrib/ci/out-of-tree-link/fwupd.c
Normal file
10
contrib/ci/out-of-tree-link/fwupd.c
Normal 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;
|
||||
}
|
10
contrib/ci/out-of-tree-link/fwupdplugin.c
Normal file
10
contrib/ci/out-of-tree-link/fwupdplugin.c
Normal 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;
|
||||
}
|
27
contrib/ci/out-of-tree-link/meson.build
Normal file
27
contrib/ci/out-of-tree-link/meson.build
Normal 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)
|
Loading…
Reference in New Issue
Block a user