Skip to content

CMake modules providing automatic test discovery from Qt Tests

License

Notifications You must be signed in to change notification settings

ocroquette/cmake-qtest-discovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

cmake-qtest-discovery

CMake modules providing automatic test discovery from Qt Tests

Introduction

Since version 3.10, CMake is able to retrieve the list of tests from a Google Test executable, see this blog entry for more information.

This repository contains similar modules for QTest, the Qt test framework.

Features

These modules don't offer all the features that gtest_discover_tests do, but still the following:

Quick start guide

  • copy the modules from "Modules" into your project
  • include(QtTest)
  • call qtest_discover_tests on the test executable, for instance: qtest_discover_tests(my_qtest_exe)
  • remove any call to add_test for this test executable
  • build "my_qtest_exe". This will run "my_qtest_exe -datatags" as a POST_BUILD action and pass the information to CMake using add_test()
  • run ctest

About

CMake modules providing automatic test discovery from Qt Tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages