Commit b3790a7d authored by Wout De Nolf's avatar Wout De Nolf
Browse files

Add an icat-mapping to the nexus_writer_session test configuration

parent 4777626b
......@@ -290,6 +290,20 @@ def lima(env=None, tmpdir=None, name="simulator1"):
yield
@contextmanager
def machinfo(env=None, tmpdir=None):
name = "machinfo"
script = os.path.join(
os.path.dirname(__file__), "..", "tests", "machinfo_tg_server.py"
)
assert os.path.isfile(script)
cliargs = [sys.executable, "-u", script, name]
with runcontext(cliargs, tmpdir=tmpdir, prefix=name, env=env):
device_fqdn = "id00/tango/" + name
wait_tango_device(device_fqdn=device_fqdn)
yield
@contextmanager
def metaexperiment(env=None, tmpdir=None, name="test"):
"""Start ICAT proposal/sample manager
......@@ -445,6 +459,9 @@ if __name__ == "__main__":
ctx = lima(env=env, tmpdir=tmpdir, name="simulator2")
stack.enter_context(ctx)
ctx = machinfo(env=env, tmpdir=tmpdir)
stack.enter_context(ctx)
if args.writer == "TANGO":
ctx = nexuswriterservice(env=env, tmpdir=tmpdir, instance="testwriters")
elif args.writer == "PROCESS":
......
name: icat
plugin: bliss
class: ICATmeta
- name: icat
plugin: bliss
class: ICATmeta
objects:
primary_slit: $primary_slit
attenuator01: $att1
objects:
primary_slit: $primary_slit
attenuator01: $att1
positioners:
sample: $roby
insertion_device_gap: [$roby,$robz]
positioners:
sample: $roby
insertion_device_gap: [$roby,$robz]
mapping:
InstrumentVariables_name: [ $roby.name, $robz.name ]
InstrumentVariables_value: [ $roby.position, $robz.position ]
mapping:
InstrumentVariables_name: [ $roby.name, $robz.name ]
InstrumentVariables_value: [ $roby.position, $robz.position ]
- name: icat_nexus_writer_sessions
plugin: bliss
class: ICATmeta
objects:
primary_slit: $primary_slit
attenuator01: $att1
source: $machinfo
- class: Session
name: nexus_writer_session
setup-file: ./nexus_writer_session_setup.py
icat-mapping: icat_nexus_writer_sessions
scan_saving:
class: ESRFScanSaving
beamline: id00
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment