diff --git a/autotests/server/CMakeLists.txt b/autotests/server/CMakeLists.txt --- a/autotests/server/CMakeLists.txt +++ b/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/autotests/server/test_display.cpp b/autotests/server/test_display.cpp --- a/autotests/server/test_display.cpp +++ b/autotests/server/test_display.cpp @@ -143,7 +143,7 @@ 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);