1 diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestDBusTestRunner.cpp b/tests/libqtdbustest/TestDBusTestRunner.cpp
2 --- a/tests/libqtdbustest/TestDBusTestRunner.cpp 2023-01-20 21:36:16.948292559 +0100
3 +++ b/tests/libqtdbustest/TestDBusTestRunner.cpp 2023-01-20 21:55:40.554530221 +0100
5 TEST_F(TestDBusTestRunner, StartsSessionService) {
6 QSharedPointer<QProcessDBusService> process(
7 new QProcessDBusService("test.session.name",
8 - QDBusConnection::SessionBus, "/usr/bin/python3",
9 + QDBusConnection::SessionBus, "python3",
10 QStringList() << "-m" << "dbusmock" << "test.session.name"
11 << "/test/object" << "test.Interface"));
14 pgrep.waitForFinished();
15 pgrep.waitForReadyRead();
18 - "/usr/bin/python3 -m dbusmock test.session.name /test/object test.Interface",
19 - QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
21 + pgrep.readAll().contains("python3 -m dbusmock test.session.name /test/object test.Interface"));
24 TEST_F(TestDBusTestRunner, StartsSystemService) {
25 QSharedPointer<QProcessDBusService> process(
26 new QProcessDBusService("test.system.name",
27 - QDBusConnection::SystemBus, "/usr/bin/python3",
28 + QDBusConnection::SystemBus, "python3",
29 QStringList() << "-m" << "dbusmock" << "-s"
30 << "test.system.name" << "/test/object"
31 << "test.Interface"));
33 pgrep.waitForFinished();
34 pgrep.waitForReadyRead();
37 - "/usr/bin/python3 -m dbusmock -s test.system.name /test/object test.Interface",
38 - QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
40 + pgrep.readAll().contains("python3 -m dbusmock -s test.system.name /test/object test.Interface"));
43 TEST_F(TestDBusTestRunner, SetsEnvironmentVariables) {
44 diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestQProcessDBusService.cpp b/tests/libqtdbustest/TestQProcessDBusService.cpp
45 --- a/tests/libqtdbustest/TestQProcessDBusService.cpp 2023-01-20 21:36:16.948292559 +0100
46 +++ b/tests/libqtdbustest/TestQProcessDBusService.cpp 2023-01-20 21:54:34.633384937 +0100
49 TEST_F(TestQProcessDBusService, WaitsForServiceAppeared) {
50 QProcessDBusService process("test.name", QDBusConnection::SessionBus,
53 QStringList() << "-m" << "dbusmock" << "test.name" << "/test/object"
57 pgrep.waitForFinished();
58 pgrep.waitForReadyRead();
61 - "/usr/bin/python3 -m dbusmock test.name /test/object test.Interface",
62 - QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
64 + pgrep.readAll().contains("python3 -m dbusmock test.name /test/object test.Interface"));
67 TEST_F(TestQProcessDBusService, ThrowsErrorForFailToStart) {
68 QProcessDBusService process("test.name", QDBusConnection::SessionBus,
71 QStringList() << "-m" << "dbusmock" << "not.test.name"
72 << "/test/object" << "test.Interface");
74 diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestSuicidalProcess.cpp b/tests/libqtdbustest/TestSuicidalProcess.cpp
75 --- a/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:36:16.948292559 +0100
76 +++ b/tests/libqtdbustest/TestSuicidalProcess.cpp 2023-01-20 21:55:07.219951081 +0100
78 pgrep.waitForFinished();
79 pgrep.waitForReadyRead();
81 - EXPECT_TRUE(QString::fromUtf8(pgrep.readAll().trimmed())
83 - .find("sleep 5") != std::string::npos);
84 + EXPECT_TRUE(pgrep.readAll().contains("sleep 5"));