summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30test: Add basic coverage for argNpatch matchesJeroen Hofstee1-0/+62
Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
2023-08-30test: Add SPDX licensing informationSimon McVittie3-0/+6
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-16test: Add basic coverage for arg0namespaceJeroen Hofstee1-0/+36
Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
2022-09-06test: Exercise handling of invalid/negative Unix fdswip/smcv/invalid-unix-fdSimon McVittie2-1/+58
Reproduces: https://github.com/firewalld/firewalld/issues/985 Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-05meson: Make installed-tests from multiple builds co-installableSimon McVittie1-2/+2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-05Add a Meson build systemSimon McVittie5-0/+225
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-05Reinstate test coverage for pip install dbus-pythonSimon McVittie2-0/+12
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-05Add licensing information in REUSE formatSimon McVittie3-1/+8
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-27add set_allow_interactive_authorization / ↵Ricter Zheng1-0/+6
get_allow_interactive_authorization for message add unit tests
2021-09-15Remove support for Python 2Simon McVittie8-258/+32
Python 2 reached EOL on 2020-01-01, and the latest version of AX_PYTHON_DEVEL breaks the build with Python 2. This seems as good a time as any to drop compatibility. Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-07-19tests: Exercise negative variant_level for UnixFd typeSimon McVittie1-0/+3
Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-23tests: Stop calling GLib.threads_initSimon McVittie3-3/+0
It is deprecated and no longer necessary. Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-23tests: Use gi.repository.GLib to avoid deprecation warningsSimon McVittie6-31/+31
Back in the days of PyGTK, there was only the gobject module, containing bindings for both GLib and GObject. This is no longer the case. Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-01-11Add support for testing without tappySimon McVittie8-63/+67
The latest version of tappy dropped Python 2 support, but I want to be able to continue to run dbus-python tests on Python 2 for now. Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-11-21test: Expand test coverage for int(), str(), unicode() of our typesSimon McVittie1-3/+79
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-09-02Fix NO_REPLY test for Python 3Simon McVittie1-1/+2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-09-02Configure test bus to allow unrequested repliesSimon McVittie1-0/+2
This lets us catch them in the test code. Fixes: e9f658d9d57b97395545c5ed2eaf9a85436f135d Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-09-02Add a test for NO_REPLY method callsSimon McVittie2-0/+80
See https://gitlab.freedesktop.org/dbus/dbus-python/issues/26 Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-09-02test-p2p: Add test coverage for sending and receiving fdsSimon McVittie2-0/+33
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-09-02Add basic test coverage for UnixFdSimon McVittie1-0/+31
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-07-23Silence -Wcast-function-type with gcc 8Simon McVittie1-1/+1
Casting via void (*)(void) is the documented way to suppress this warning. This is required because the CPython API treats function pointers as generic, with flags to indicate different calling conventions. Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-07-15with-session-bus.sh: Remove unused scriptSimon McVittie1-106/+0
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-07-15Add clearer licensing information in SPDX formatSimon McVittie17-1/+35
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-07-15Remove remaining support for Ubuntu 14.04 'trusty'Simon McVittie1-1/+2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-05-09cross-test-server: Avoid a race condition in the clientSimon McVittie1-4/+9
There is a race condition here between these chains of events, which as far as I can tell has existed for at least 10 years: * server receives Tests.Trigger() and schedules SignalTests.Triggered * server returns to main loop * server emits SignalTests.Triggered * client receives SignalTests.Triggered and * server receives Tests.Trigger() and replies with success * client receives success and emits SignalTests.Trigger * server receives SignalTests.Trigger and calls CallbackTests.Response() * client receives CallbackTests.Response() and calls Tests.Exit() * server receives Tests.Exit() and replies with success * client quits its main loop If we don't reply to Tests.Trigger() until after the SignalTests.Triggered signal has been sent, because the client called Tests.Trigger() asynchronously, messages are not re-ordered and the reply arrives after the signal; so the whole chain of events leading up to "client receives SignalTests.Triggered" happens before "client receives success and emits SignalTests.Trigger" and there is no race condition. Bug-Debian: https://bugs.debian.org/898158
2018-05-09cross-test-client: Wait until default method timeout for Exit()Simon McVittie1-2/+0
On a slow machine under load, communication might legitimately take time. After the default method-call timeout (25 seconds) we'll go into quit_error_handler() and exit anyway. Bug-Debian: https://bugs.debian.org/898158
2018-01-29Avoid using async keywordSimon McVittie2-5/+5
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-11-01Revert "test/import-repeatedly: skip on Python 3.6 for now"Simon McVittie1-11/+0
Python 3.6.0a4 is meant to have fixed this. This reverts commit 1013581fef91c9be087d6264084cec34c2ca6e9a. Signed-off-by: Simon McVittie <smcv@collabora.com>
2016-08-11Drop support for Python 2.6, along with several workaroundsSimon McVittie1-32/+14
It hasn't had security support for about 3 years. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-08-11test/import-repeatedly: skip on Python 3.6 for nowSimon McVittie1-0/+11
This is a workaround for <http://bugs.python.org/issue27736>. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-08-11import-repeatedly: detect exceptionsSimon McVittie1-1/+4
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-08-11Use TAP syntax for all directly-run testsSimon McVittie9-58/+130
For now this means that skipped tests will be reported as passed. This will be corrected in the next commit. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-06unicode test: cope with Python 2.6 as provided on travis-ciSimon McVittie1-1/+4
Python 2.6 didn't allow struct.pack(u'...', ...). Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-05run-test: avoid "test: =: unary operator expected"Simon McVittie1-2/+3
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-05Fix Unicode tests on narrow Python buildsSimon McVittie1-10/+29
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57140 Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-05Add a regression test for the version numberingSimon McVittie1-0/+14
Now that dbus.__version__ and dbus.version exist even in uninstalled builds, we can do this. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-05Move dbus-python.h to a dbus subdirectorySimon McVittie1-1/+1
This means we can consistently #include <dbus/dbus-python.h>, either in-tree or out-of-tree. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-02-22Make all test scripts properly executableSimon McVittie7-0/+4
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-01-20Use gi instead of gobject, everywhere except dbus.gobject_serviceSimon McVittie1-2/+2
2016-01-20Replace hard-coded sleep with a wait for the D-Bus name to appearSimon McVittie2-6/+70
2016-01-20Use non-recursive make for tests, and make them into installed-testsSimon McVittie10-225/+93
2016-01-20Use non-recursive make for everything except testsSimon McVittie1-1/+1
2015-12-06Simplify testing by using dbus-run-session and Automake "log compiler"Simon McVittie4-167/+167
Fall back to Telepathy's old with-session-bus.sh script if dbus doesn't have dbus-run-session (versions < 1.8). Also run most of the tests individually, instead of under run-test.sh.
2015-12-06Use AX_COMPILER_FLAGSSimon McVittie1-7/+19
2015-12-05Update build system for Automake 1.13 (parallel test driver)Simon McVittie1-7/+9
2013-05-08distribute new testsdbus-python-1.2.0Simon McVittie1-0/+2
2013-05-08Add support for skipping tests, and use itSimon McVittie7-15/+62
Now that Python 2.6 isn't a supported version in Debian, it doesn't get a gi module, but we can still get some minimal test coverage.
2013-05-08utf8 test: pass when used with dbus 1.6.10, 1.7.2Simon McVittie1-16/+25
We used to reject noncharacters, but now we accept them.
2013-04-22Unset DBUS_STARTER_ADDRESS, DBUS_STARTER_BUS_TYPESimon McVittie1-0/+2
See <https://bugs.freedesktop.org/show_bug.cgi?id=63119>.
2012-10-16Slightly better test coverageSimon McVittie1-0/+4