Skip to content

Commit

Permalink
✅ Run qml test in flake check
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Aug 21, 2024
1 parent 7ee5d3f commit bd57347
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
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"

0 comments on commit bd57347

Please sign in to comment.