Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Jan 16, 2025
1 parent d5c2726 commit 2cf3799
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 124 deletions.
2 changes: 1 addition & 1 deletion src/builder2ibek/converters/interlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xml_component = "interlock"

# records the port names of the read100 entities keyed by name
read100Objects = {}
read100Objects: dict[str, str] = {}


@globalHandler
Expand Down
2 changes: 1 addition & 1 deletion src/builder2ibek/dbcompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ def compare_dbs(
if not output:
print(result)
else:
output.write_text(result)
output.write_text(result + "\n")
130 changes: 17 additions & 113 deletions tests/samples/compare.diff
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*******************************************************************
Records in original but not in new:

bo SR03C-VA-IOC-01:SRHEARTBT
calc SR03A-VA-GAUGE-01:PLOG_CALC
calc SR03A-VA-GAUGE-02:PLOG_CALC
calc SR03A-VA-GAUGE-03:PLOG_CALC
Expand All @@ -13,30 +12,6 @@ genSub SR03A-VA-MIMG-01:MEAN
genSub SR03C-VA-MIMG-01:MEAN
genSub SR03S-VA-MIMG-01:MEAN
genSub SR03S-VA-MIMG-02:MEAN
longout SR03C-VA-IOC-01:0:STATE
longout SR03C-VA-IOC-01:1:STATE
longout SR03C-VA-IOC-01:2:STATE
mbbo SR03C-VA-IOC-01:0:STATUS
mbbo SR03C-VA-IOC-01:1:STATUS
mbbo SR03C-VA-IOC-01:2:STATUS
mbbo SR03C-VA-IOC-01:RRSTATUS
mbbo SR03C-VA-IOC-01:SRSTATUS
stringin SR03C-VA-IOC-01:DLSVER
stringin SR03C-VA-IOC-01:IOC_LOG_PORT
stringin SR03C-VA-IOC-01:TIMEZONE
stringout SR03C-VA-IOC-01:0:NAME
stringout SR03C-VA-IOC-01:0:STATUSST
stringout SR03C-VA-IOC-01:0:TIME
stringout SR03C-VA-IOC-01:1:NAME
stringout SR03C-VA-IOC-01:1:STATUSST
stringout SR03C-VA-IOC-01:1:TIME
stringout SR03C-VA-IOC-01:2:NAME
stringout SR03C-VA-IOC-01:2:STATUSST
stringout SR03C-VA-IOC-01:2:TIME
stringout SR03C-VA-IOC-01:RRSTATUSST
stringout SR03C-VA-IOC-01:RRTIME
stringout SR03C-VA-IOC-01:SRRECENTST
stringout SR03C-VA-IOC-01:SRSTATUSST

*******************************************************************
Records in new but not in original:
Expand All @@ -45,100 +20,29 @@ aSub SR03A-VA-MIMG-01:MEAN
aSub SR03C-VA-MIMG-01:MEAN
aSub SR03S-VA-MIMG-01:MEAN
aSub SR03S-VA-MIMG-02:MEAN
ai SR03C-VA-IOC-01:CBHIGH_Q_HIGH
ai SR03C-VA-IOC-01:CBHIGH_Q_OVERRUNS
ai SR03C-VA-IOC-01:CBHIGH_Q_USED
ai SR03C-VA-IOC-01:CBLOW_Q_HIGH
ai SR03C-VA-IOC-01:CBLOW_Q_OVERRUNS
ai SR03C-VA-IOC-01:CBLOW_Q_USED
ai SR03C-VA-IOC-01:CBMEDIUM_Q_HIGH
ai SR03C-VA-IOC-01:CBMEDIUM_Q_OVERRUNS
ai SR03C-VA-IOC-01:CBMEDIUM_Q_USED
ai SR03C-VA-IOC-01:CB_Q_SIZE
ai SR03C-VA-IOC-01:SCANONCE_Q_HIGH
ai SR03C-VA-IOC-01:SCANONCE_Q_OVERRUNS
ai SR03C-VA-IOC-01:SCANONCE_Q_SIZE
ai SR03C-VA-IOC-01:SCANONCE_Q_USED
bo SR03C-VA-IOC-01:SR_deadIfZero
bo SR03C-VA-IOC-01:SR_disable
bo SR03C-VA-IOC-01:SR_heartbeat
bo SR03C-VA-IOC-01:SR_i_am_alive
calc SR03A-VA-GAUGE-01:RAW:EGU
calc SR03A-VA-GAUGE-02:RAW:EGU
calc SR03A-VA-GAUGE-03:RAW:EGU
calc SR03A-VA-GAUGE-04:RAW:EGU
calc SR03A-VA-GAUGE-31:RAW:EGU
calc SR03C-VA-IOC-01:CBHIGH_Q_HIGHPER
calc SR03C-VA-IOC-01:CBHIGH_Q_USEDPER
calc SR03C-VA-IOC-01:CBLOW_Q_HIGHPER
calc SR03C-VA-IOC-01:CBLOW_Q_USEDPER
calc SR03C-VA-IOC-01:CBMEDIUM_Q_HIGHPER
calc SR03C-VA-IOC-01:CBMEDIUM_Q_USEDPER
calc SR03C-VA-IOC-01:SCANONCE_Q_HIGHPER
calc SR03C-VA-IOC-01:SCANONCE_Q_USEDPER
calc SR03S-VA-GAUGE-01:RAW:EGU
calc SR03S-VA-GAUGE-02:RAW:EGU
longout SR03C-VA-IOC-01:SR_0_State
longout SR03C-VA-IOC-01:SR_1_State
longout SR03C-VA-IOC-01:SR_2_State
longout SR03C-VA-IOC-01:SR_3_State
longout SR03C-VA-IOC-01:SR_4_State
longout SR03C-VA-IOC-01:SR_5_State
longout SR03C-VA-IOC-01:SR_6_State
longout SR03C-VA-IOC-01:SR_7_State
longout SR03C-VA-IOC-01:SR_disableMaxSecs
mbbo SR03C-VA-IOC-01:SR_0_Status
mbbo SR03C-VA-IOC-01:SR_1_Status
mbbo SR03C-VA-IOC-01:SR_2_Status
mbbo SR03C-VA-IOC-01:SR_3_Status
mbbo SR03C-VA-IOC-01:SR_4_Status
mbbo SR03C-VA-IOC-01:SR_5_Status
mbbo SR03C-VA-IOC-01:SR_6_Status
mbbo SR03C-VA-IOC-01:SR_7_Status
mbbo SR03C-VA-IOC-01:SR_rebootStatus
mbbo SR03C-VA-IOC-01:SR_status
stringin SR03C-VA-IOC-01:CAS_ADDR_IGNORE_LIST
stringin SR03C-VA-IOC-01:CAS_ADDR_INTF_LIST
stringin SR03C-VA-IOC-01:CAS_ADDR_LIST
stringin SR03C-VA-IOC-01:CAS_AUTO_ADDR
stringin SR03C-VA-IOC-01:CAS_BEACON_PERIOD
stringin SR03C-VA-IOC-01:CAS_BEACON_PORT
stringin SR03C-VA-IOC-01:CAS_SRVR_PORT
stringin SR03C-VA-IOC-01:IOC_LOG_FILE_COMMAND
stringin SR03C-VA-IOC-01:IOC_LOG_FILE_LIMIT
stringin SR03C-VA-IOC-01:IOC_LOG_FILE_NAME
stringin SR03C-VA-IOC-01:TZ
stringout SR03C-VA-IOC-01:SR_0_Name
stringout SR03C-VA-IOC-01:SR_0_StatusStr
stringout SR03C-VA-IOC-01:SR_0_Time
stringout SR03C-VA-IOC-01:SR_1_Name
stringout SR03C-VA-IOC-01:SR_1_StatusStr
stringout SR03C-VA-IOC-01:SR_1_Time
stringout SR03C-VA-IOC-01:SR_2_Name
stringout SR03C-VA-IOC-01:SR_2_StatusStr
stringout SR03C-VA-IOC-01:SR_2_Time
stringout SR03C-VA-IOC-01:SR_3_Name
stringout SR03C-VA-IOC-01:SR_3_StatusStr
stringout SR03C-VA-IOC-01:SR_3_Time
stringout SR03C-VA-IOC-01:SR_4_Name
stringout SR03C-VA-IOC-01:SR_4_StatusStr
stringout SR03C-VA-IOC-01:SR_4_Time
stringout SR03C-VA-IOC-01:SR_5_Name
stringout SR03C-VA-IOC-01:SR_5_StatusStr
stringout SR03C-VA-IOC-01:SR_5_Time
stringout SR03C-VA-IOC-01:SR_6_Name
stringout SR03C-VA-IOC-01:SR_6_StatusStr
stringout SR03C-VA-IOC-01:SR_6_Time
stringout SR03C-VA-IOC-01:SR_7_Name
stringout SR03C-VA-IOC-01:SR_7_StatusStr
stringout SR03C-VA-IOC-01:SR_7_Time
stringout SR03C-VA-IOC-01:SR_rebootStatusStr
stringout SR03C-VA-IOC-01:SR_rebootTime
stringout SR03C-VA-IOC-01:SR_recentlyStr
stringout SR03C-VA-IOC-01:SR_statusStr

*******************************************************************
records in original: 7436
records in new: 7495
records missing in new: 36
records extra in new: 95
records in original: 8327
records in new: 8386
records missing in new: 11
records extra in new: 11
*******************************************************************

fields for 'ai SR03A-VA-GAUGE-01:PLOG' are different between the two DBs
fields for 'ai SR03A-VA-GAUGE-02:PLOG' are different between the two DBs
fields for 'ai SR03A-VA-GAUGE-03:PLOG' are different between the two DBs
fields for 'ai SR03A-VA-GAUGE-04:PLOG' are different between the two DBs
fields for 'ai SR03A-VA-GAUGE-31:PLOG' are different between the two DBs
fields for 'ai SR03S-VA-GAUGE-01:PLOG' are different between the two DBs
fields for 'ai SR03S-VA-GAUGE-02:PLOG' are different between the two DBs
fields for 'fanout SR03C-VA-VFAST-01:FAN_01' are different between the two DBs
fields for 'fanout SR03C-VA-VFAST-01:FAN_02' are different between the two DBs
fields for 'stringin SR03C-VA-IOC-01:STARTTOD' are different between the two DBs
fields for 'stringin SR03C-VA-IOC-01:TOD' are different between the two DBs
5 changes: 4 additions & 1 deletion tests/samples/make_samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
# caution: validate that the yaml diff looks good before committing these
# changes

THIS=$(dirname $0)
cd $THIS

for x in *.xml; do
y=$(echo $x | sed -e 's/\.xml/\.yaml/' -e 's/.*/\L&/g')
echo converting $x to $y
builder2ibek xml2yaml $x --yaml $y
done

builder2ibek db-compare ./SR03C-VA-IOC-01_expanded.db ./sr03c-va-ioc-01.db --output ./compare.diff
builder2ibek db-compare ./SR03C-VA-IOC-01_expanded.db ./sr03c-va-ioc-01.db --output ./compare.diff --ignore SR03C-VA-IOC-01:
8 changes: 1 addition & 7 deletions tests/samples/sr03c-va-ioc-01.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ entities:

- type: autosave.Autosave
P: 'SR03C-VA-IOC-01:'
debug: false

- type: asyn.AsynIP
name: GCTLR_A_01_PORT
Expand Down Expand Up @@ -158,43 +159,36 @@ entities:
dom: SR03S
id: 1
input: SR03S-VA-GAUGE-01:RAW
name: GAUGE_S_01

- type: mks937a.mks937aGaugeEGU
dom: SR03S
id: 2
input: SR03S-VA-GAUGE-02:RAW
name: GAUGE_S_02

- type: mks937a.mks937aGaugeEGU
dom: SR03A
id: 1
input: SR03A-VA-GAUGE-01:RAW
name: GAUGE_A_01

- type: mks937a.mks937aGaugeEGU
dom: SR03A
id: 2
input: SR03A-VA-GAUGE-02:RAW
name: GAUGE_A_02

- type: mks937a.mks937aGaugeEGU
dom: SR03A
id: 3
input: SR03A-VA-GAUGE-03:RAW
name: GAUGE_A_03

- type: mks937a.mks937aGaugeEGU
dom: SR03A
id: 4
input: SR03A-VA-GAUGE-04:RAW
name: GAUGE_A_04

- type: mks937a.mks937aGaugeEGU
dom: SR03A
id: 31
input: SR03A-VA-GAUGE-31:RAW
name: GAUGE_A_31

- type: mks937a.mks937aImg
GCTLR: GCTLR_S_01
Expand Down
2 changes: 1 addition & 1 deletion tests/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def test_conmpare(samples: Path):
old = samples / "SR03C-VA-IOC-01_expanded.db"
new = samples / "sr03c-va-ioc-01.db"
result = Path("/tmp") / "compare.diff"
result = samples / "compare.diff"

output = Path("/tmp") / "compare.diff"
compare_dbs(old, new, ignore=["SR03C-VA-IOC-01:"], output=output)
Expand Down

0 comments on commit 2cf3799

Please sign in to comment.