-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to latest dependencies. add tests
- Loading branch information
Showing
12 changed files
with
144 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
epics-containers-cli==2.6.3 | ||
#git+https://github.com/epics-containers/epics-containers-cli.git@dev | ||
ibek==1.5.0 | ||
# to install direct from github during development in the dev branch: | ||
#git+https://github.com/epics-containers/ibek.git@dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
epics-containers-cli==2.6.4 | ||
# to install direct from github during development in the dev branch: | ||
#git+https://github.com/epics-containers/epics-containers-cli.git@dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
record(calc, "EXAMPLE2:SUM") { | ||
field(DESC, "Sum A and B") | ||
field(CALC, "A+B") | ||
field(INPA, "EXAMPLE2:A") | ||
field(INPB, "EXAMPLE2:B") | ||
} | ||
|
||
record(ao, "EXAMPLE2:A") { | ||
field(DESC, "A voltage") | ||
field(PREC, "3") | ||
field(EGU, "Volts") | ||
field(DRVL, "-10") | ||
field(DRVH, "+10") | ||
field(VAL, "0.000") | ||
field(FLNK, "EXAMPLE2:SUM") | ||
} | ||
|
||
record(ao, "EXAMPLE2:B") { | ||
field(DESC, "B voltage") | ||
field(PREC, "3") | ||
field(EGU, "Volts") | ||
field(DRVL, "-10") | ||
field(DRVH, "+10") | ||
field(VAL, "0.000") | ||
field(FLNK, "EXAMPLE2:SUM") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# Macros: | ||
# IOC Device prefix | ||
file $(IOCSTATS)/db/iocAdminSoft.db | ||
{ | ||
pattern { IOC } | ||
{ "test-ioc" } | ||
} | ||
|
||
# Macros: | ||
# IOC Device prefix | ||
file $(IOCSTATS)/db/iocAdminScanMon.db | ||
{ | ||
pattern { IOC } | ||
{ "test-ioc" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Example hand coded IOC startup script for example-config | ||
cd "/epics/ioc" | ||
|
||
epicsEnvSet "EPICS_CA_MAX_ARRAY_BYTES", '6000000' | ||
|
||
dbLoadDatabase "dbd/ioc.dbd" | ||
ioc_registerRecordDeviceDriver(pdbbase) | ||
|
||
dbLoadRecords("config/calc.db") | ||
dbLoadRecords("/tmp/ioc.db") | ||
|
||
iocInit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
record(calc, "EXAMPLE:IBEK:SUM") { | ||
field(DESC, "Sum A and B") | ||
field(CALC, "A+B") | ||
field(INPA, "EXAMPLE:IBEK:A") | ||
field(INPB, "EXAMPLE:IBEK:B") | ||
} | ||
|
||
record(ao, "EXAMPLE:IBEK:A") { | ||
field(DESC, "A voltage") | ||
field(PREC, "3") | ||
field(EGU, "Volts") | ||
field(DRVL, "-10") | ||
field(DRVH, "+10") | ||
field(VAL, "0.000") | ||
field(FLNK, "EXAMPLE:IBEK:SUM") | ||
} | ||
|
||
record(ao, "EXAMPLE:IBEK:B") { | ||
field(DESC, "B voltage") | ||
field(PREC, "3") | ||
field(EGU, "Volts") | ||
field(DRVL, "-10") | ||
field(DRVH, "+10") | ||
field(VAL, "0.000") | ||
field(FLNK, "EXAMPLE:IBEK:SUM") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ioc_name: test-ibek-ioc | ||
description: a basic example for testing ioc-template | ||
|
||
entities: | ||
- type: devIocStats.iocAdminSoft | ||
IOC: test-ibek-ioc | ||
|
||
- type: epics.StartupCommand | ||
command: dbLoadRecords("/epics/ioc/config/ioc.db") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# test script for ioc-template to verify that the container loads and the | ||
# generic IOC will start - demonstrating that the correct runtime libraries | ||
# all present and correct and that mounting IOC config or ibek config | ||
# works as expected. | ||
|
||
THIS_DIR=$(realpath $(dirname $0)) | ||
ROOT=$(realpath ${THIS_DIR}/..) | ||
|
||
set -ex | ||
|
||
cd ${ROOT} | ||
# Build the container (inherit arguments from CI workflow if set) ############## | ||
ec dev build ${EC_TAG} | ||
|
||
# try out an ibek config IOC instance with the generic IOC ##################### | ||
ec dev launch-local tests/example-config --args '-dit' ${EC_TAG} | ||
ec dev wait-pv EXAMPLE2:A --attempts 20 | ||
ec dev exec 'caput EXAMPLE2:A 1.3' | ||
ec dev exec 'caput EXAMPLE2:B 1.2' | ||
ec dev exec 'caget EXAMPLE2:SUM' | grep '2.5' | ||
|
||
# Test an ibek IOC ############################################################# | ||
ec dev launch-local tests/example-ibek-config --args '-dit' ${EC_TAG} | ||
ec dev wait-pv EXAMPLE:IBEK:A --attempts 20 | ||
ec dev exec 'caput EXAMPLE:IBEK:A 1.3' | ||
ec dev exec 'caput EXAMPLE:IBEK:B 1.2' | ||
ec dev exec 'caget EXAMPLE:IBEK:SUM' | grep '2.5' | ||
ec dev exec 'caget test-ibek-ioc:EPICS_VERS' | grep 'R7.0.7' | ||
|
||
# Stop the test IOC ############################################################ | ||
ec dev stop | ||
|
||
# Done ######################################################################### | ||
echo | ||
echo "All tests passed!" | ||
|
||
|
||
|