fixed python simulator test fixture (#1350)

* fixed python simulator test fixture

* clear_roi after every test to bring it back to default state, test passing multiple parameters

* Exposing the ctb api tests now to CI

* Revert "Exposing the ctb api tests now to CI"

This reverts commit 411fad1b27.

* fixed tests removed uneccessary stuff

* did not save properly

* updated documentation, renamed file

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
2026-08-03 09:10:07 +02:00
committed by mazzol_a
co-authored by maliakal_d
parent 73f9d4299a
commit 732599bc10
7 changed files with 593 additions and 225 deletions
+6 -3
View File
@@ -257,7 +257,7 @@ def connectToVirtualServers(name, num_mods, ctb_object=False):
counts_sec = 5
while (counts_sec != 0):
try:
d.virtual = [num_mods, SERVER_START_PORTNO]
d.virtual = [num_mods, SERVER_START_PORTNO] # sets the hostnames
break
except Exception as e:
# stop server still not up, wait a bit longer
@@ -288,13 +288,16 @@ def startReceiver(num_mods, fp, no_log_file = False, quiet_mode=False):
def loadConfig(name, rx_hostname = 'localhost', settingsdir = None, log_file_fp = None, num_mods = 1, num_frames = 1, num_interfaces = 1):
Log(LogLevel.INFO, 'Loading config', log_file_fp, True)
try:
d = connectToVirtualServers(name, num_mods)
if name == 'ctb' or name == 'xilinx_ctb':
d = connectToVirtualServers(name, num_mods, ctb_object=True)
else:
d = connectToVirtualServers(name, num_mods)
if name == 'jungfrau' or name == 'moench':
d.numinterfaces = num_interfaces
d.udp_dstport = DEFAULT_UDP_DST_PORTNO
if name == 'eiger' or num_interfaces == 2:
if d.numinterfaces == 2:
d.udp_dstport2 = DEFAULT_UDP_DST_PORTNO + 1
d.rx_hostname = rx_hostname