From cfe9600d491fde54ee9b302541f1097582081eea Mon Sep 17 00:00:00 2001 From: mazzol_a Date: Fri, 2 May 2025 14:17:46 +0200 Subject: [PATCH] stopped receiver --- .../tests/Caller/test-Caller-rx-running.cpp | 19 +++++++++---------- tests/scripts/test_simulators.py | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/slsDetectorSoftware/tests/Caller/test-Caller-rx-running.cpp b/slsDetectorSoftware/tests/Caller/test-Caller-rx-running.cpp index 7329f969d..e3258c77a 100644 --- a/slsDetectorSoftware/tests/Caller/test-Caller-rx-running.cpp +++ b/slsDetectorSoftware/tests/Caller/test-Caller-rx-running.cpp @@ -45,29 +45,28 @@ auto get_test_parameters() { std::make_tuple("frames", std::vector{"10"}), std::make_tuple("triggers", std::vector{"5"}), std::make_tuple("rx_dbitlist", std::vector{"{1,2,10}"}), - std::make_tuple("rx_dbitreorder", std::vector{"false"}), + std::make_tuple("rx_dbitreorder", std::vector{"0"}), std::make_tuple("rx_dbitoffset", std::vector{"5"}), std::make_tuple("findex", std::vector{"2"}), - std::make_tuple("fwrite", std::vector{"false"}), + std::make_tuple("fwrite", std::vector{"0"}), std::make_tuple("bursts", std::vector{"20"})); } TEST_CASE("cant put if receiver is not idle", "[.cmdcall][.rx]") { - std::cout << "im in here: " << std::endl; + auto [command, function_arguments] = get_test_parameters(); + Detector det; Caller caller(&det); - det.setFileWrite(false); // avoid writing or error on file creation - - auto [command, function_arguments] = get_test_parameters(); // start receiver std::ostringstream oss; - caller.call("rx_start", {}, -1, PUT, - oss); // why is there no receiver id passed - + caller.call("rx_start", {}, -1, PUT, oss); REQUIRE(oss.str() == "rx_start successful\n"); REQUIRE_THROWS(caller.call(command, function_arguments, -1, PUT, oss, -1)); -} + std::ostringstream oss_stop; + caller.call("rx_stop", {}, -1, PUT, oss_stop); + REQUIRE(oss_stop.str() == "rx_stop successful\n"); +} } // namespace sls \ No newline at end of file diff --git a/tests/scripts/test_simulators.py b/tests/scripts/test_simulators.py index ea580c5e6..f400764ea 100644 --- a/tests/scripts/test_simulators.py +++ b/tests/scripts/test_simulators.py @@ -23,7 +23,7 @@ def Log(color, message): def checkIfProcessRunning(processName): - cmd = f"pgrep -f {processName}" + cmd = f"pgrep {processName}" res = subprocess.getoutput(cmd) return bool(res.strip()) @@ -206,9 +206,9 @@ with open(fname, 'w') as fp: Log(Fore.BLUE, 'General tests (results: ' + file_results + ')') try: - startGeneralTests(fp, file_results) killAllStaleProcesses(fp) - + startGeneralTests(fp, file_results) + testError = False for server in servers: try: