mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 02:28:05 +00:00
tests: Get tod driver name from env variable
This commit is contained in:
@@ -28,11 +28,14 @@ fpt_context_new_with_fake_dev (void)
|
||||
{
|
||||
FptContext *tctx;
|
||||
GPtrArray *devices;
|
||||
const char *tod_name;
|
||||
unsigned int i;
|
||||
|
||||
tctx = fpt_context_new ();
|
||||
devices = fp_context_get_devices (tctx->fp_context);
|
||||
tod_name = g_getenv ("FP_TOD_TEST_DRIVER_NAME");
|
||||
|
||||
g_assert_nonnull (tod_name);
|
||||
g_assert_nonnull (devices);
|
||||
g_assert_cmpuint (devices->len, ==, 1);
|
||||
|
||||
@@ -40,7 +43,7 @@ fpt_context_new_with_fake_dev (void)
|
||||
{
|
||||
FpDevice *device = devices->pdata[i];
|
||||
|
||||
if (g_strcmp0 (fp_device_get_driver (device), "fake_test_dev_tod") == 0)
|
||||
if (g_strcmp0 (fp_device_get_driver (device), tod_name) == 0)
|
||||
{
|
||||
tctx->device = device;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user