Skip to content
Merged
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
22 changes: 21 additions & 1 deletion .github/workflows/cmake_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ jobs:

- name: Setup (Linux)
if: startsWith (matrix.os, 'ubuntu')
run: sudo apt-get install libxkbcommon-dev
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-dev xvfb

- name: Setup VS tools (Windows)
if: startsWith (matrix.os, 'windows')
Expand All @@ -82,3 +84,21 @@ jobs:

- name: Build with ${{ matrix.compiler }}
run: cmake --build build --config ${{ matrix.configuration }}

- name: Run Tests (Linux)
if: startsWith (matrix.os, 'ubuntu')
run: |
cd build
xvfb-run -a ctest --output-on-failure --progress

- name: Run Tests (macOS)
if: startsWith (matrix.os, 'macos')
run: |
cd build
ctest --output-on-failure --progress

- name: Run Tests (Windows)
if: startsWith (matrix.os, 'windows')
run: |
cd build
ctest -C ${{ matrix.configuration }} --output-on-failure --progress
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

16 changes: 7 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(OpenGL_GL_PREFERENCE LEGACY)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Enable AUTOMOC globally for all targets (needed for examples with Q_OBJECT)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

get_directory_property(_has_parent PARENT_DIRECTORY)
if(_has_parent)
set(is_root_project OFF)
Expand All @@ -30,8 +34,6 @@ option(BUILD_DEBUG_POSTFIX_D "Append d suffix to debug libraries" OFF)
option(QT_NODES_FORCE_TEST_COLOR "Force colorized unit test output" OFF)
option(USE_QT6 "Build with Qt6 (Enabled by default)" ON)

enable_testing()

if(QT_NODES_DEVELOPER_DEFAULTS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
Expand Down Expand Up @@ -191,12 +193,6 @@ set_target_properties(QtNodes
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)

######
# Moc
##
set_target_properties(QtNodes PROPERTIES AUTOMOC ON AUTORCC ON)


###########
# Examples
##
Expand All @@ -212,9 +208,11 @@ endif()
##################
# Automated Tests
##
enable_testing()


if(BUILD_TESTING)
#add_subdirectory(test)
add_subdirectory(test)
endif()

###############
Expand Down
44 changes: 40 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ Qt Creator
----------

1. Open `CMakeLists.txt` as project.
2. If you don't have the `Catch2` library installed, go to `Build Settings`, disable the checkbox `BUILD_TESTING`.
3. `Build -> Run CMake`
4. `Build -> Build All`
5. Click the button `Run`
2. `Build -> Run CMake`
3. `Build -> Build All`
4. Click the button `Run`

.. note::
The project includes unit tests built with Catch2. If you don't have Catch2 installed,
you can disable testing by setting `-DBUILD_TESTING=OFF` in CMake configuration.


With Cmake using `vcpkg`
Expand All @@ -153,6 +156,39 @@ With Cmake using `vcpkg`
-DCMAKE_TOOLCHAIN_FILE=<vcpkg_dir>/scripts/buildsystems/scripts/buildsystems/vcpkg.cmake


Testing
=======

QtNodes includes a comprehensive unit test suite built with Catch2.

**Running Tests**

From the build directory:

::

# Build tests
make test_nodes

# Run all tests
./bin/test_nodes

# Run specific categories
./bin/test_nodes "[core]" # Core functionality tests
./bin/test_nodes "[graphics]" # Graphics system tests

**Test Coverage**

* Core model operations (node CRUD, connections)
* Signal emission verification (AbstractGraphModel signals)
* Serialization (JSON save/load)
* Undo system integration
* Graphics scene management
* Connection utilities

For detailed testing documentation, see the `Testing Guide <https://qtnodes.readthedocs.io/en/latest/testing.html>`_.


Help Needed
===========

Expand Down
13 changes: 10 additions & 3 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ Development Progress
- [✅ done] Dynamic ports
- [✅ done] ``AbstractNodeGeometry``, ``AbstractNodePainter``
- [✅ done] Website with documentation
- [✅] ``ConnectionPaintDelegate``
- [➡️ work in progress] Unit-Tests
- [➡️ work in progress] Ctrl+D for copying and inserting a selection duplicate
- [✅ done] ``ConnectionPaintDelegate``
- [✅ done] Unit-Tests
- [✅ done] Ctrl+D for copying and inserting a selection duplicate
- [⏸ not started] Node groups
- [⏸ not started] Check how styles work and what needs to be done. See old pull-requests
- [☝ help needed] Python bindings. Maybe a wrapper using Shiboken
- Python examples
- [☝ help needed] QML front-end


Testing
=======

QtNodes includes a comprehensive unit test suite. For detailed information about
running tests, test coverage, and implementation details, see :doc:`testing`.

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ QtNodes Documentation
features
porting
development
testing
classes
notes
license_link
Expand Down
Loading
Loading