summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test: Exercise handling of invalid/negative Unix fdswip/smcv/invalid-unix-fdSimon McVittie2022-09-062-1/+58
| | | | | Reproduces: https://github.com/firewalld/firewalld/issues/985 Signed-off-by: Simon McVittie <smcv@collabora.com>
* meson: Make installed-tests from multiple builds co-installableSimon McVittie2022-09-051-2/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add a Meson build systemSimon McVittie2022-09-055-0/+225
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Reinstate test coverage for pip install dbus-pythonSimon McVittie2022-09-052-0/+12
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add licensing information in REUSE formatSimon McVittie2022-09-053-1/+8
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* add set_allow_interactive_authorization / ↵Ricter Zheng2022-04-271-0/+6
| | | | | | get_allow_interactive_authorization for message add unit tests
* Remove support for Python 2Simon McVittie2021-09-158-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>
* tests: Exercise negative variant_level for UnixFd typeSimon McVittie2021-07-191-0/+3
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* tests: Stop calling GLib.threads_initSimon McVittie2020-11-233-3/+0
| | | | | | It is deprecated and no longer necessary. Signed-off-by: Simon McVittie <smcv@collabora.com>
* tests: Use gi.repository.GLib to avoid deprecation warningsSimon McVittie2020-11-236-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>
* Add support for testing without tappySimon McVittie2020-01-118-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>
* test: Expand test coverage for int(), str(), unicode() of our typesSimon McVittie2019-11-211-3/+79
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Fix NO_REPLY test for Python 3Simon McVittie2019-09-021-1/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Configure test bus to allow unrequested repliesSimon McVittie2019-09-021-0/+2
| | | | | | | This lets us catch them in the test code. Fixes: e9f658d9d57b97395545c5ed2eaf9a85436f135d Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add a test for NO_REPLY method callsSimon McVittie2019-09-022-0/+80
| | | | | | See https://gitlab.freedesktop.org/dbus/dbus-python/issues/26 Signed-off-by: Simon McVittie <smcv@collabora.com>
* test-p2p: Add test coverage for sending and receiving fdsSimon McVittie2019-09-022-0/+33
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add basic test coverage for UnixFdSimon McVittie2019-09-021-0/+31
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Silence -Wcast-function-type with gcc 8Simon McVittie2019-07-231-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>
* with-session-bus.sh: Remove unused scriptSimon McVittie2019-07-151-106/+0
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Add clearer licensing information in SPDX formatSimon McVittie2019-07-1517-1/+35
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Remove remaining support for Ubuntu 14.04 'trusty'Simon McVittie2019-07-151-1/+2
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* cross-test-server: Avoid a race condition in the clientSimon McVittie2018-05-091-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
* cross-test-client: Wait until default method timeout for Exit()Simon McVittie2018-05-091-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
* Avoid using async keywordSimon McVittie2018-01-292-5/+5
| | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* Revert "test/import-repeatedly: skip on Python 3.6 for now"Simon McVittie2017-11-011-11/+0
| | | | | | | | Python 3.6.0a4 is meant to have fixed this. This reverts commit 1013581fef91c9be087d6264084cec34c2ca6e9a. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Drop support for Python 2.6, along with several workaroundsSimon McVittie2016-08-111-32/+14
| | | | | | It hasn't had security support for about 3 years. Signed-off-by: Simon McVittie <smcv@debian.org>
* test/import-repeatedly: skip on Python 3.6 for nowSimon McVittie2016-08-111-0/+11
| | | | | | This is a workaround for <http://bugs.python.org/issue27736>. Signed-off-by: Simon McVittie <smcv@debian.org>
* import-repeatedly: detect exceptionsSimon McVittie2016-08-111-1/+4
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* Use TAP syntax for all directly-run testsSimon McVittie2016-08-119-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>
* unicode test: cope with Python 2.6 as provided on travis-ciSimon McVittie2016-03-061-1/+4
| | | | | | Python 2.6 didn't allow struct.pack(u'...', ...). Signed-off-by: Simon McVittie <smcv@debian.org>
* run-test: avoid "test: =: unary operator expected"Simon McVittie2016-03-051-2/+3
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* Fix Unicode tests on narrow Python buildsSimon McVittie2016-03-051-10/+29
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57140 Signed-off-by: Simon McVittie <smcv@debian.org>
* Add a regression test for the version numberingSimon McVittie2016-03-051-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>
* Move dbus-python.h to a dbus subdirectorySimon McVittie2016-03-051-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>
* Make all test scripts properly executableSimon McVittie2016-02-227-0/+4
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* Use gi instead of gobject, everywhere except dbus.gobject_serviceSimon McVittie2016-01-201-2/+2
|
* Replace hard-coded sleep with a wait for the D-Bus name to appearSimon McVittie2016-01-202-6/+70
|
* Use non-recursive make for tests, and make them into installed-testsSimon McVittie2016-01-2010-225/+93
|
* Use non-recursive make for everything except testsSimon McVittie2016-01-201-1/+1
|
* Simplify testing by using dbus-run-session and Automake "log compiler"Simon McVittie2015-12-064-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.
* Use AX_COMPILER_FLAGSSimon McVittie2015-12-061-7/+19
|
* Update build system for Automake 1.13 (parallel test driver)Simon McVittie2015-12-051-7/+9
|
* distribute new testsdbus-python-1.2.0Simon McVittie2013-05-081-0/+2
|
* Add support for skipping tests, and use itSimon McVittie2013-05-087-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.
* utf8 test: pass when used with dbus 1.6.10, 1.7.2Simon McVittie2013-05-081-16/+25
| | | | We used to reject noncharacters, but now we accept them.
* Unset DBUS_STARTER_ADDRESS, DBUS_STARTER_BUS_TYPESimon McVittie2013-04-221-0/+2
| | | | See <https://bugs.freedesktop.org/show_bug.cgi?id=63119>.
* Slightly better test coverageSimon McVittie2012-10-161-0/+4
|
* Use a form of assertRaises() that works in Python 2.6Simon McVittie2012-10-161-3/+2
|
* Skip test_dbus_exception_convert_str_fail under unusual default encodingsSimon McVittie2012-10-161-3/+8
| | | | | This would actually work fine if the default encoding was UTF-8 or Latin-1 or something.
* Support unicode messages for DBusException in Python 2Michael Vogt2012-10-163-0/+95
| | | | | | [commit message amended -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55899 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>