mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-29 08:50:06 +01:00
Run Linux integration tests in "make check"
If possible, run the tests under dbus-launch to ensure that there is a private D-BUS session bus. This allows the tests to work in e. g. a clean package build environment, and also avoids messing with the real user session bus.
This commit is contained in:
parent
e1f4aa38de
commit
7c617ba6f1
2 changed files with 10 additions and 2 deletions
|
|
@ -49,6 +49,13 @@ EXTRA_DIST = $(libupshared_la_SOURCES)
|
|||
libupshared_la_CFLAGS = \
|
||||
$(WARNINGFLAGS_C)
|
||||
|
||||
if UP_BUILD_TESTS
|
||||
DBUS_LAUNCH=$(shell which dbus-launch)
|
||||
|
||||
check-local: $(top_builddir)/src/upowerd
|
||||
env top_builddir=$(top_builddir) $(DBUS_LAUNCH) ./integration-test -v
|
||||
endif
|
||||
|
||||
clean-local :
|
||||
rm -f *~
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,9 @@ class Tests(unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
# run from local build tree if we are in one, otherwise use system instance
|
||||
if os.access (os.path.join('src', 'upowerd'), os.X_OK):
|
||||
daemon_path = os.path.join('src', 'upowerd')
|
||||
builddir = os.getenv('top_builddir', '.')
|
||||
if os.access (os.path.join(builddir, 'src', 'upowerd'), os.X_OK):
|
||||
daemon_path = os.path.join(builddir, 'src', 'upowerd')
|
||||
print('Testing binaries from local build tree')
|
||||
else:
|
||||
print('Testing installed system binaries')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue