Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Run qml test in flake check #25

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,9 @@
echo "Run shell hook"
${shellHook}

# This used to work with Qt5, but not with Qt6...?
# More investigation needed
# xvfb-run dbus-run-session \
# --config-file=${pkgs.dbus}/share/dbus-1/session.conf \
# ctest -C "${cmakeConfigType}" --output-on-failure --verbose
xvfb-run dbus-run-session \
--config-file=${pkgs.dbus}/share/dbus-1/session.conf \
ctest -C "${cmakeConfigType}" --output-on-failure --verbose
'';

installPhase = ''
Expand Down
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set(QOLM_TEST_SRCS ${QOLM_TEST_TARGET_DIR}/Tests.cpp
message(STATUS "Add Test: ${QOLM_TEST_TARGET}")

# Create the executable
add_executable(${QOLM_TEST_TARGET} ${QOLM_TEST_SRCS})
qt_add_executable(${QOLM_TEST_TARGET} ${QOLM_TEST_SRCS})
set_target_properties(${QOLM_TEST_TARGET} PROPERTIES AUTOMOC TRUE)
target_include_directories(${QOLM_TEST_TARGET} PRIVATE ${QOLM_TEST_TARGET_DIR}/include)
target_link_libraries(${QOLM_TEST_TARGET} PRIVATE ${QOLM_TARGET})
Expand All @@ -45,7 +45,7 @@ set(QOLM_TEST_QML_SRCS ${QOLM_TEST_TARGET_QML_DIR}/QOlmTestsQml.cpp)
message(STATUS "Add Test: ${QOLM_TEST_TARGET_QML}")

# Create the executable
add_executable(${QOLM_TEST_TARGET_QML} ${QOLM_TEST_QML_SRCS})
qt_add_executable(${QOLM_TEST_TARGET_QML} ${QOLM_TEST_QML_SRCS})
set_target_properties(${QOLM_TEST_TARGET_QML} PROPERTIES AUTOMOC TRUE AUTORCC TRUE)
target_include_directories(${QOLM_TEST_TARGET_QML} PRIVATE ${QOLM_TEST_TARGET_QML_DIR}/include)
target_link_libraries(${QOLM_TEST_TARGET_QML} PRIVATE ${QOLM_TARGET})
Expand Down
3 changes: 2 additions & 1 deletion tests/QOlmTestsQml.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <QtQuickTest>
#include <QQmlEngine>
#include <QQmlContext>
#include <QGuiApplication>

#include <QOlm/QOlm.hpp>

Expand All @@ -22,4 +23,4 @@ public slots:

QUICK_TEST_MAIN_WITH_SETUP(QOlmTestsQml, Setup)

#include "QOlmTestsQml.moc"
#include "QOlmTestsQml.moc"
Loading