From f889d9801f490b67558b2c7a71dc1f3e1eb445a7 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 20 May 2021 21:50:58 +0100 Subject: Do not run the tests on FreeBSD Root hubs on FreeBSD have vid and pid set to zero. Based on a patch by Ting-Wei Lan --- gusb/gusb-self-test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gusb/gusb-self-test.c b/gusb/gusb-self-test.c index 924c66e..4b5ab2c 100644 --- a/gusb/gusb-self-test.c +++ b/gusb/gusb-self-test.c @@ -21,6 +21,11 @@ gusb_device_func (void) GUsbContext *ctx; GUsbDevice *device; +#ifdef __FreeBSD__ + g_test_skip ("Root hubs on FreeBSD have vid and pid set to zero"); + return; +#endif + ctx = g_usb_context_new (&error); g_assert_no_error (error); g_assert (ctx != NULL); @@ -71,6 +76,11 @@ gusb_context_func (void) gchar *product; guint i; +#ifdef __FreeBSD__ + g_test_skip ("Root hubs on FreeBSD have vid and pid set to zero"); + return; +#endif + ctx = g_usb_context_new (&error); g_assert_no_error (error); g_assert (ctx != NULL); -- cgit v1.2.1