diff --git a/src/wayland/autotests/server/CMakeLists.txt b/src/wayland/autotests/server/CMakeLists.txt index f06e93d7cf..f5a4854c0c 100644 --- a/src/wayland/autotests/server/CMakeLists.txt +++ b/src/wayland/autotests/server/CMakeLists.txt @@ -1,7 +1,6 @@ ######################################################## # Test WaylandServerDisplay ######################################################## -add_definitions(-DAUTOTEST_CURRENT_BIN_DIR="${CMAKE_CURRENT_BINARY_DIR}") set( testWaylandServerDisplay_SRCS test_display.cpp ) diff --git a/src/wayland/autotests/server/test_display.cpp b/src/wayland/autotests/server/test_display.cpp index 2a4e07e8ee..f9e2ee607c 100644 --- a/src/wayland/autotests/server/test_display.cpp +++ b/src/wayland/autotests/server/test_display.cpp @@ -143,7 +143,7 @@ void TestWaylandServerDisplay::testClientConnection() QVERIFY(connection->groupId() != 0); QVERIFY(connection->processId() != 0); QCOMPARE(connection->display(), &display); - QCOMPARE(connection->executablePath(), QStringLiteral("%1/testWaylandServerDisplay").arg(AUTOTEST_CURRENT_BIN_DIR)); + QCOMPARE(connection->executablePath(), QCoreApplication::applicationFilePath()); QCOMPARE((wl_client*)*connection, client); const ClientConnection &constRef = *connection; QCOMPARE((wl_client*)constRef, client);