Skip to content

Add filedb support to catch2 and add free object properties to FileDatabase

Thomas Ives requested to merge filedb-catch2-improvements into main

This MR includes a collection of general improvements made for the Alarm Event MR (!1134 (merged)). I have pulled them out here so that we can use the catch2 infrastructure elsewhere without having to wait for that MR.

This MR does the following:

  • TangoTest::Context supports starting the servers with -filedb rather than -nodb. You have to add additional properties to the database file as a string. It would be preferable to use a FileDatabase to build up the database contents, but I was struggling to disentangle the reading/writing a file logic from the "storing database values" logic. I have left this improvement for another time. Maybe there is something I am missing which makes this more straight forward than I think it is.
  • The TestServer's are passed a TANGO_TEST_ENABLED_CLASSES environment variable. This selects which device classes to register with Tango. The TangoTest::Context only passes the class it is actually going to start. This speeds up startup times and is required for the filedb to work.
  • FileDatabase now support free object properties
  • Catch2Tests now has an --only-idl flag, this allows you only run the tests against a specific IDL. I have found this useful when debugging to avoid getting multiple copies of the same error when we run the same test against different IDL versions.
  • Added TangoTest::AutoSpecutrumAttr and TangoTest::AutoImageAttr
  • Improved logging during tests.

Merge request reports