Files
ModemManager/tools/tests/Makefile.am
Aleksander Morgado 7b7bbdd999 tools: disable stub tester if no introspection enabled
TEST: test-stub...
    /MM/stub/modem/interface: dbus-daemon[48020]: [session uid=0 pid=48020] Activating service name='org.freedesktop.ModemManager1' requested by ':1.0' (uid=0 pid=48005 comm="/builds/mobile-broadband/ModemManager/tools/tests/")
  Traceback (most recent call last):
    File "/builds/mobile-broadband/ModemManager/tools/test-modemmanager-service.py", line 7, in <module>
      gi.require_version('ModemManager', '1.0')
    File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
      raise ValueError('Namespace %s not available' % namespace)
  ValueError: Namespace ModemManager not available
  dbus-daemon[48020]: [session uid=0 pid=48020] Activated service 'org.freedesktop.ModemManager1' failed: Process org.freedesktop.ModemManager1 exited with status 1
2021-04-28 22:41:06 +02:00

50 lines
1.1 KiB
Makefile

include $(top_srcdir)/gtester.make
################################################################################
# common
################################################################################
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(MM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libmm-glib \
-I${top_srcdir}/libmm-glib/generated \
-I${top_builddir}/libmm-glib/generated \
$(NULL)
LDADD = \
$(top_builddir)/libmm-glib/libmm-glib.la \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(MM_LIBS) \
$(MM_LDFLAGS) \
$(NULL)
noinst_PROGRAMS = test-stub
test_stub_CPPFLAGS = \
-DTEST_SERVICES=\""$(abs_top_builddir)/tools/tests/services"\" \
$(NULL)
# only run the test if introspection was enabled
if HAVE_INTROSPECTION
TEST_PROGS += $(noinst_PROGRAMS)
endif
test-wrapper.sh: test-wrapper.sh.in
@sed \
-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
$< >$@
@chmod +x $@
BUILT_SOURCES = test-wrapper.sh
CLEANFILES = test-wrapper.sh
EXTRA_DIST += test-wrapper.sh.in services/org.freedesktop.ModemManager1.service.in