Skip to content

Commit

Permalink
Added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Herbert committed Oct 7, 2024
1 parent 14b5d5f commit 8565d81
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/samples/BL99P-EA-IOC-05.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<components arch="linux-x86_64">
<EPICS_BASE.EpicsEnvSet key="EPICS_CA_MAX_ARRAY_BYTES" value="9000000"/>
<devIocStats.devIocStatsHelper ioc="BL99P-EA-IOC-05" name="IOC-STATS"/>
<!--ADAndor.andorCCD ADDR="0" BUFFERS="2000" INSTALLPATH="/dls_sw/prod/R3.14.12.7/support/andorCCDSDK/2-102dls4/andorCCDSDKApp/src/sdk/andor/etc" P="BL99P-EA-DET-03" PORT="DET3.cam" R=":CAM:" TIMEOUT="1"/-->
<ADAndor.andorCCD ADDR="0" BUFFERS="2000" INSTALLPATH="/dls_sw/prod/R3.14.12.7/support/ANAndor/etc" P="BL99P-EA-DET-03" PORT="DET3.cam" R=":CAM:" TIMEOUT="1"/>
<!--<ADZMQ.NDZMQPlugin DEST_ADDR="127.0.0.1:1515" NDARRAY_PORT="DET3.cam" P="BL99P-EA-DET-03" PORT="DET3.zmq" QUEUE="1000" R=":ZMQ:" TRANSPORT="tcp" ZMQ_TYPE="PUSH"/>-->
<ADCore.NDPosPlugin ADDR="0" BLOCK="0" ENABLED="1" NDARRAY_PORT="DET3.cam" P="BL99P-EA-DET-03" PORT="DET3.pos" QUEUE="1000" R=":POS:" TIMEOUT="1"/>
</components>
15 changes: 15 additions & 0 deletions tests/test_file_conversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import subprocess
import sys


def test_cli_version():
cmd = [sys.executable, "-m", "builder2ibek", "file", "--yaml", "out.yaml", "tests/samples/BL45P-MO-IOC-01.xml"]
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
assert result.stderr == b""

cmd = [sys.executable, "-m", "builder2ibek", "file", "--yaml", "out.yaml", "tests/samples/BL99P-EA-IOC-05.xml"]
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
assert result.stderr == b""



0 comments on commit 8565d81

Please sign in to comment.