fix tests
This commit is contained in:
@ -55,7 +55,7 @@ proc startioc {} {
|
|||||||
if [info exists asynversion] {
|
if [info exists asynversion] {
|
||||||
puts $fd "require asyn,$asynversion"
|
puts $fd "require asyn,$asynversion"
|
||||||
}
|
}
|
||||||
puts $fd "require stream2,$streamversion"
|
puts $fd "require stream,$streamversion"
|
||||||
} else {
|
} else {
|
||||||
puts $fd "#!../O.$env(EPICS_HOST_ARCH)/streamApp"
|
puts $fd "#!../O.$env(EPICS_HOST_ARCH)/streamApp"
|
||||||
puts $fd "dbLoadDatabase ../O.Common/streamApp.dbd"
|
puts $fd "dbLoadDatabase ../O.Common/streamApp.dbd"
|
||||||
@ -77,7 +77,9 @@ proc startioc {} {
|
|||||||
}
|
}
|
||||||
fconfigure $ioc -blocking yes -buffering none
|
fconfigure $ioc -blocking yes -buffering none
|
||||||
debugmsg "waiting to connect"
|
debugmsg "waiting to connect"
|
||||||
|
set timer [after 1000 {puts stderr "\033\[31;7mCannot start IOC.\033\[0m"; exit 1}]
|
||||||
vwait sock
|
vwait sock
|
||||||
|
after cancel $timer
|
||||||
}
|
}
|
||||||
|
|
||||||
set lastcommand ""
|
set lastcommand ""
|
||||||
|
@ -41,12 +41,10 @@ set protocol {
|
|||||||
set startup {
|
set startup {
|
||||||
}
|
}
|
||||||
|
|
||||||
set debug 0
|
|
||||||
|
|
||||||
startioc
|
startioc
|
||||||
|
|
||||||
set inf [format %f inf]
|
set inf [format %f inf]
|
||||||
set nan [format %f nan]
|
if [catch {set nan [format %f nan]}] {set nan nan}
|
||||||
|
|
||||||
ioccmd {dbpf DZ:test1.PROC 1}
|
ioccmd {dbpf DZ:test1.PROC 1}
|
||||||
send "3.14159265359\n"
|
send "3.14159265359\n"
|
||||||
|
@ -50,7 +50,7 @@ set protocol {
|
|||||||
in {in "%{zero|one|two}bla"; out "%d";}
|
in {in "%{zero|one|two}bla"; out "%d";}
|
||||||
out1 {out "%#{zero|one|two}bla";}
|
out1 {out "%#{zero|one|two}bla";}
|
||||||
in1 {in "%#{zero|one|two}bla"; out "%d";}
|
in1 {in "%#{zero|one|two}bla"; out "%d";}
|
||||||
out2 {out "%#{zero=-1|one|two=5}bla";}
|
out2 {out "%#{zero=-1|one|two=5|default=?}bla";}
|
||||||
in2 {in "%#{zero=-1|one|two=5}bla"; out "%d";}
|
in2 {in "%#{zero=-1|one|two=5}bla"; out "%d";}
|
||||||
in3 {in "%{\x00|\r|}bla"; out "%d";}
|
in3 {in "%{\x00|\r|}bla"; out "%d";}
|
||||||
}
|
}
|
||||||
@ -81,6 +81,8 @@ ioccmd {dbpf DZ:testout2 0}
|
|||||||
assure "onebla\n"
|
assure "onebla\n"
|
||||||
ioccmd {dbpf DZ:testout2 5}
|
ioccmd {dbpf DZ:testout2 5}
|
||||||
assure "twobla\n"
|
assure "twobla\n"
|
||||||
|
ioccmd {dbpf DZ:testout2 17}
|
||||||
|
assure "defaultbla\n"
|
||||||
|
|
||||||
ioccmd {dbpf DZ:testin.PROC 1}
|
ioccmd {dbpf DZ:testin.PROC 1}
|
||||||
send "zerobla\n"
|
send "zerobla\n"
|
||||||
|
@ -68,15 +68,15 @@ ioccmd {dbpf DZ:lo 12345}
|
|||||||
assure "12345 12345 012345 3039 003039 11000000111001 11000000111001 111001 !!......!!!..! !!......!!!..!\n"
|
assure "12345 12345 012345 3039 003039 11000000111001 11000000111001 111001 !!......!!!..! !!......!!!..!\n"
|
||||||
ioccmd {dbpf DZ:lo -1}
|
ioccmd {dbpf DZ:lo -1}
|
||||||
if {$tcl_platform(machine) == "x86_64"} {
|
if {$tcl_platform(machine) == "x86_64"} {
|
||||||
assure "-1 -1 -00001 ffffffffffffffff FFFFFFFFFFFFFFFF 1111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
|
assure "-1 -1 -00001 ffffffffffffffff FFFFFF 11111111111111111111111111111111 11111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
|
||||||
} else {
|
} else {
|
||||||
assure "-1 -1 -00001 ffffffff FFFFFFFF 11111111111111111111111111111111 11111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
|
assure "-1 -1 -00001 ffffffff FFFFFFFF 11111111111111111111111111111111 11111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
|
||||||
}
|
}
|
||||||
ioccmd {dbpf DZ:lo -1234}
|
ioccmd {dbpf DZ:lo -1234}
|
||||||
if {$tcl_platform(machine) == "x86_64"} {
|
if {$tcl_platform(machine) == "x86_64"} {
|
||||||
assure "-1234 -1234 -01234 fffffffffffffb2e FFFFFFFFFFFFFB2E 1111111111111111111111111111111111111111111111111111101100101110 1111111111111111111111111111111111111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n"
|
assure "-1234 -1234 -01234 fffffffffffffb2e FFFB2E 1111111111111111111111111111111111111111111111111111101100101110 1111111111111111111111111111111111111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n"
|
||||||
} else {
|
} else {
|
||||||
assure "-1234 -1234 -01234 fffffb2e FFFFFB2E 11111111111111111111101100101110 11111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n"
|
assure "-1234 -1234 -01234 fffffb2e FFFB2E 11111111111111111111101100101110 11111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n"
|
||||||
}
|
}
|
||||||
ioccmd {dbpf DZ:lo 255}
|
ioccmd {dbpf DZ:lo 255}
|
||||||
assure "255 255 000255 ff 0000FF 11111111 11111111 111111 !!!!!!!! !!!!!!!!\n"
|
assure "255 255 000255 ff 0000FF 11111111 11111111 111111 !!!!!!!! !!!!!!!!\n"
|
||||||
|
@ -10,16 +10,19 @@ set records {
|
|||||||
record (ai, "DZ:test1")
|
record (ai, "DZ:test1")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test1 device")
|
field (INP, "@test.proto test1 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test2")
|
record (ai, "DZ:test2")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test2 device")
|
field (INP, "@test.proto test2 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test3")
|
record (ai, "DZ:test3")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test3 device")
|
field (INP, "@test.proto test3 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test4")
|
record (ai, "DZ:test4")
|
||||||
@ -30,26 +33,31 @@ set records {
|
|||||||
record (ai, "DZ:test5")
|
record (ai, "DZ:test5")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test5 device")
|
field (INP, "@test.proto test5 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test6")
|
record (ai, "DZ:test6")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test6 device")
|
field (INP, "@test.proto test6 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test7")
|
record (ai, "DZ:test7")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test7 device")
|
field (INP, "@test.proto test7 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test8")
|
record (ai, "DZ:test8")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test8 device")
|
field (INP, "@test.proto test8 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test9")
|
record (ai, "DZ:test9")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
|
field (LINR, "LINEAR")
|
||||||
field (INP, "@test.proto test9 device")
|
field (INP, "@test.proto test9 device")
|
||||||
}
|
}
|
||||||
record (ai, "DZ:test10")
|
record (ai, "DZ:test10")
|
||||||
@ -225,11 +233,7 @@ send "-0x12345\n"
|
|||||||
assure "mismatch\n"
|
assure "mismatch\n"
|
||||||
ioccmd {dbpf DZ:test4.PROC 1}
|
ioccmd {dbpf DZ:test4.PROC 1}
|
||||||
send "0xffffffff\n"
|
send "0xffffffff\n"
|
||||||
if {$tcl_platform(wordSize) == 8} {
|
assure "ffffffff\n"
|
||||||
assure "ffffffffffffffff\n"
|
|
||||||
} else {
|
|
||||||
assure "ffffffff\n"
|
|
||||||
}
|
|
||||||
ioccmd {dbpf DZ:test4.PROC 1}
|
ioccmd {dbpf DZ:test4.PROC 1}
|
||||||
send "-0xffffffff\n"
|
send "-0xffffffff\n"
|
||||||
assure "mismatch\n"
|
assure "mismatch\n"
|
||||||
|
Reference in New Issue
Block a user