From b8b0dd6e460bfa855cb4079e302d2e4ead8c8a8a Mon Sep 17 00:00:00 2001
From: Jens Georg <jens.georg@desy.de>
Date: Mon, 10 Oct 2022 16:19:06 +0200
Subject: [PATCH] Fix testConfigReader

Move the config module to the proper level for matching up with the
device
---
 tests/executables_src/testConfigReader.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/executables_src/testConfigReader.cc b/tests/executables_src/testConfigReader.cc
index 5c0d540e..757e067b 100644
--- a/tests/executables_src/testConfigReader.cc
+++ b/tests/executables_src/testConfigReader.cc
@@ -153,7 +153,7 @@ struct TestApplication : public ctk::Application {
   ~TestApplication() { shutdown(); }
 
   ctk::ConfigReader config{this, "config", "validConfig.xml", {"MyTAG"}};
-  TestModule testModule{this, "TestModule", "The test module"};
+  TestModule testModule{this, "config", "The test module"};
 };
 
 /*********************************************************************************************************************/
@@ -185,7 +185,7 @@ struct TestApplicationWithDevice : public ctk::Application {
   TestApplicationWithDevice() : Application("TestApplicationWithDevice") {}
   ~TestApplicationWithDevice() { shutdown(); }
 
-  ctk::ConfigReader config{this, "config", "validConfig.xml", {"MyTAG"}};
+  ctk::ConfigReader config{this, ".", "validConfig.xml", {"MyTAG"}};
   ctk::DeviceModule device{this, cdd};
 };
 
@@ -239,8 +239,9 @@ BOOST_AUTO_TEST_CASE(testConfigReader) {
   // app.config.virtualise().dump();
   // app.config.connectTo(app.testModule);
 
-  app.initialise();
-  app.run();
+  // Cheap way to get a PV manager
+  ctk::TestFacility tf{app, false};
+  tf.runApplication();
 
   // wait until tests in TestModule::mainLoop() are complete
   while(app.testModule.done == false) usleep(10000);
-- 
GitLab