Skip to content

Add infrastructure for new test paradigm and an example test

Thomas Ives requested to merge add-catch into main

This MR introduces Catch2 to the code base for a new suite of tests. I have called these "BDD" tests as I am using the "BDD" macros from Catch2, better names are welcome.

The tests can launch their own device servers (in -nodb mode) to run against. I have added a "platform layer" to handle starting and stopping the servers on each platform. This is currently only implemented for Linux but I have left stubs for what I believe needs implementing for Windows and macOS.

I have added the start of a "high-level API" for write device servers in auto_device_class.h as we will be writing lots of device classes. This is far from complete but we can update it as we port tests to the new paradigm.

Running against a tango database has been left for another MR. I wonder if we could implement some mock database device which could be started from the tests like other device servers. If that doesn't work it should be straight forward to add CLI arguments to the test binary to be able to accept device names as we do for the current tests.

TODO

  • merge CI docker images and update .gitlab-ci.yml

Closes #1064 (closed), #1218 (closed), #1204 (closed) and #870 (closed)

Edited by Thomas Ives

Merge request reports