EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: New/improved iocsh debug utility functions (dbli)
From: Dirk Zimoch <[email protected]>
To: <[email protected]>
Date: Fri, 9 Mar 2018 11:35:21 +0100
Thanks. Don't hurry. At the moment learning Perl is not so high on my prio list. Maybe I simply redirect dbli to a file and compare it from the C test program.

I took out channel access and data base access to info fields for now, leaving only the dbli function. So now neither caget nor dbgf or links work. Tell me if you want to have db access back.

I had to push --force the branch to the previous state without ca.

I will move database and channel access to a different branch.

BTW: I tested info fields with .[{$ in the name and they worked with caget. However if you have info items "name" and "name$" in the same record in this order and you ask for "name$" you will get "name" as a char array, not "name$" as a string. But "name$$" gives you "name$" as a char array. (Actually needs single quotes to prevent the shell from interpreting $$. Same for $ in the middle.) If you have the order reversed you cannot get "name" as a char array because "name$" gives you "name$" as a string. All in all: works as expected.

Space in the name did not work.

Dirk

On 08.03.2018 23:07, Andrew Johnson wrote:
Hi Dirk,

On 03/08/2018 07:15 AM, Dirk Zimoch wrote:
Now I would like to add tests. Is there already support to compare shell
function output with expected output?

Where to put the test? I want to test the shell function as well as
channel access.

The easiest way to write that kind of test might be in Perl. There is a
Perl IOC module that can start an IOC as a sub-process, feed it iocsh
commands and return their responses, then shut down the IOC again. It
only works with Base-3.16 or later though since it has to be able to
disable GNU readline for the iocsh communication to work properly.

The perl CA library doesn't build or run on Windows, but we would just
not try to build or run those tests on Windows.

The IOC.pm module is used in Marty Kraimer's exampleCPP PVA module in a
fairly simple way to run other test programs after starting an IOC, but
it has more capabilities that he is actually using. I have written
programs that start an IOC, connect to it over CA, do CA puts/gets and
use the built-in dbpf/dbgf commands to put/get data. It's very easy to
send your own iocsh commands and get back a multi-line response, as long
as the command is synchronous (no background tasks!).

It does need some better documentation to be written though which is why
I haven't added it to Base as a module yet, but I'd be willing to do
that if you're interested in using it. Just don't expect it tomorrow...

- Andrew


References:
New/improved iocsh debug utility functions Dirk Zimoch
Re: New/improved iocsh debug utility functions Andrew Johnson
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
Re: New/improved iocsh debug utility functions (dbli) Andrew Johnson

Navigate by Date:
Prev: Re: New/improved iocsh debug utility functions (dbli) Andrew Johnson
Next: Jenkins build is back to stable : epics-master » linux64 #46 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: New/improved iocsh debug utility functions (dbli) Andrew Johnson
Next: MSI Makefile Madness Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 12 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·