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
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- Replies:
- Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
- 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
- Navigate by Date:
- Prev:
RE: Crash on IOC exit Mark Rivers
- Next:
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
- Next:
Re: New/improved iocsh debug utility functions (dbli) Dirk Zimoch
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
|