Compare commits

...

15 Commits

Author SHA1 Message Date
Benjamin Berg
1528c962fa tests: Adjust timeouts to avoid CI failures
The virtual-image test is quite CPU intensive and can take a long time
in the CI setup. Adjust the timeouts so that it runs reliably.
2020-03-27 15:20:08 +00:00
Marco Trevisan (Treviño)
c26588942a ci: Print coverage data once available so that gitlab can parse it 2020-03-27 00:00:07 +01:00
Laurent Bigonville
3d68cddfe7 Properly set the dependencies in the pkg-config file
The public API uses gio and gobject header, ensure that these are in the
list of Required pkg-config modules, otherwise they are added to
Required.private which is not OK.
2020-03-20 11:13:06 +00:00
Benjamin Berg
96fba323b9 meson: Fix linking issue of libfprint with newer gcc
It appears the order of linking is relevant in this case, change it to
fix some linking issues.

It may be that there are better solutions to this problem.
2020-03-20 12:05:14 +01:00
Benjamin Berg
bd4f118b5e ci: Update CI after the fdo template changes
The CI definition needs to be updated to work with the new fdo
templates.
2020-03-20 12:05:14 +01:00
Benjamin Berg
9d4b5ad682 Revert "ci: Fix CI syntax error"
This reverts commit bd500b2235.

The fix from the commit was not correct.

See https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/124
2020-03-20 12:05:08 +01:00
Benjamin Berg
ca788b6de2 Revert "ci: Fix unknown keys in CI"
This reverts commit ebe5cb58ba.

The fix from the commit was not correct.

See https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/124
2020-03-20 12:04:58 +01:00
Bastien Nocera
90ccf9a0af vfs0050: Fix incorrect destructor for GError 2020-03-13 10:23:52 +01:00
Bastien Nocera
2581f1aa32 aes1610: Fix memory leak
Fix small memory leak when reading some data that's not going to be
processed.
2020-03-13 10:23:52 +01:00
Bastien Nocera
ebe5cb58ba ci: Fix unknown keys in CI
Fix:
root config contains unknown keys: container_fedora_build
2020-03-13 10:14:59 +01:00
Bastien Nocera
bd500b2235 ci: Fix CI syntax error
Fix CI syntax error:
container_fedora_build: unknown keys in `extends` (.fedora@container-build)
Caused by changes in the wayland CI templates:
4a73f030d0
2020-03-13 10:08:58 +01:00
Bastien Nocera
8fa50d667c ci: s/flatpack/flatpak/
“Flatpack” is for IKEA furniture.
2020-03-13 10:08:58 +01:00
Marco Trevisan (Treviño)
2ae8b74e60 meson: Add fpi-compat.h to the private headers 2020-02-27 06:03:21 +01:00
Benjamin Berg
f4ec816a6b tests: Cast to correct pointer type rather than gpointer
This is just a small cleanup
2020-02-19 16:42:30 +01:00
Benjamin Berg
9e2a7235e3 tests: Fix reading of gboolean into pointer
Otherwise the payload will be lost later on when using GPOINTER_TO_INT
to cast it back.

See: #236
2020-02-19 16:42:30 +01:00
7 changed files with 25 additions and 13 deletions

View File

@@ -6,9 +6,9 @@ include:
variables:
extends: .libfprint_common_variables
FEDORA_TAG: rawhide
FEDORA_VERSION: rawhide
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION:$FEDORA_TAG"
FDO_DISTRIBUTION_TAG: latest
FDO_DISTRIBUTION_VERSION: rawhide
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
@@ -16,7 +16,7 @@ stages:
- check-source
- build
- test
- flatpack
- flatpak
image: "$FEDORA_IMAGE"
@@ -57,8 +57,9 @@ test:
script:
- meson --werror -Ddrivers=all -Db_coverage=true . _build
- ninja -C _build
- meson test -C _build --verbose --no-stdsplit --timeout-multiplier 3
- meson test -C _build --verbose --no-stdsplit
- ninja -C _build coverage
- cat _build/meson-logs/coverage.txt
artifacts:
paths:
- _build/meson-logs
@@ -107,7 +108,7 @@ test_indent:
.flatpak_master_template: &flatpak_master
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32
stage: flatpack
stage: flatpak
variables:
MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
# From demo/org.freedesktop.libfprint.Demo.json
@@ -135,11 +136,11 @@ flatpak-manual master:
# CONTAINERS creation stage
container_fedora_build:
extends: .fedora@container-build
extends: .fdo.container-build@fedora
only:
variables:
- $CI_PIPELINE_SOURCE == "schedule" && $CRON_TASK == "BUILD_CI_IMAGES"
variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
# a list of packages to install
FEDORA_RPMS: $LIBFPRINT_DEPENDENCIES
FDO_DISTRIBUTION_PACKAGES: $LIBFPRINT_DEPENDENCIES

View File

@@ -138,7 +138,7 @@ generic_read_ignore_data (FpiSsm *ssm, FpDevice *dev,
unsigned char *data;
data = g_malloc (bytes);
fpi_usb_transfer_fill_bulk_full (transfer, EP_IN, data, bytes, NULL);
fpi_usb_transfer_fill_bulk_full (transfer, EP_IN, data, bytes, g_free);
transfer->ssm = ssm;
transfer->short_is_error = TRUE;
fpi_usb_transfer_submit (transfer, BULK_TIMEOUT, NULL,

View File

@@ -119,7 +119,7 @@ async_abort_callback (FpiUsbTransfer *transfer, FpDevice *device,
/* In normal case endpoint is empty */
if (g_error_matches (error, G_USB_DEVICE_ERROR, G_USB_DEVICE_ERROR_TIMED_OUT))
{
g_free (error);
g_error_free (error);
fpi_ssm_next_state (transfer->ssm);
return;
}

View File

@@ -31,6 +31,7 @@ libfprint_private_headers = [
'fpi-byte-reader.h',
'fpi-byte-utils.h',
'fpi-byte-writer.h',
'fpi-compat.h',
'fpi-context.h',
'fpi-device.h',
'fpi-image-device.h',
@@ -203,6 +204,7 @@ deps = [
enums_dep,
gio_dep,
glib_dep,
gobject_dep,
gusb_dep,
imaging_dep,
mathlib_dep,
@@ -258,7 +260,7 @@ libfprint = library(versioned_libname.split('lib')[1],
version: libversion,
link_args : vflag,
link_depends : mapfile,
link_with: [libfprint_private, libfprint_drivers],
link_with: [libfprint_drivers, libfprint_private],
dependencies: deps,
install: true)
@@ -268,6 +270,7 @@ libfprint_dep = declare_dependency(link_with: libfprint,
enums_dep,
gio_dep,
glib_dep,
gobject_dep,
gusb_dep,
])
@@ -324,6 +327,7 @@ if get_option('introspection')
link_with : libfprint,
dependencies : [
gio_dep,
gobject_dep,
gusb_dep,
],
includes : [

View File

@@ -79,6 +79,7 @@ versioned_libname = meson.project_name() + '-' + soversion.to_string()
# Dependencies
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
gio_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version)
gobject_dep = dependency('gobject-2.0', version: '>=' + glib_min_version)
gusb_dep = dependency('gusb', version: '>= 0.2.0')
mathlib_dep = cc.find_library('m', required: false)
@@ -210,6 +211,7 @@ pkgconfig.generate(
description: 'Generic C API for fingerprint reader access',
version: meson.project_version(),
libraries: libfprint,
requires: [gio_dep, gobject_dep],
subdirs: versioned_libname,
filebase: versioned_libname,
)

View File

@@ -30,6 +30,7 @@ if get_option('introspection')
unittest_inspector = find_program('unittest_inspector.py')
base_args = files('virtual-image.py')
suite = []
timeout = 30
r = run_command(unittest_inspector, files('virtual-image.py'))
unit_tests = r.stdout().strip().split('\n')
@@ -38,6 +39,7 @@ if get_option('introspection')
suite += 'virtual-image'
else
unit_tests = ['virtual-image']
timeout = 120
endif
foreach ut: unit_tests
@@ -53,6 +55,7 @@ if get_option('introspection')
suite: ut_suite,
depends: libfprint_typelib,
env: envs,
timeout: timeout,
)
endforeach
else

View File

@@ -189,6 +189,7 @@ static void
fpi_device_fake_capture (FpDevice *device)
{
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
gboolean wait_for_finger;
fake_dev->last_called_function = fpi_device_fake_capture;
g_assert_cmpuint (fpi_device_get_current_action (device), ==, FPI_DEVICE_ACTION_CAPTURE);
@@ -199,7 +200,8 @@ fpi_device_fake_capture (FpDevice *device)
return;
}
fpi_device_get_capture_data (device, (gboolean *) &fake_dev->action_data);
fpi_device_get_capture_data (device, &wait_for_finger);
fake_dev->action_data = GINT_TO_POINTER (wait_for_finger);
fpi_device_capture_complete (device, fake_dev->ret_image, fake_dev->ret_error);
}
@@ -234,7 +236,7 @@ fpi_device_fake_delete (FpDevice *device)
return;
}
fpi_device_get_delete_data (device, (gpointer) (&fake_dev->action_data));
fpi_device_get_delete_data (device, (FpPrint **) (&fake_dev->action_data));
fpi_device_delete_complete (device, fake_dev->ret_error);
}