Code review comment for lp:~epics-core/epics-gateway/dbe_props

Revision history for this message
Andrew Johnson (anj) wrote :

Ok. That should actually by pyepics (version 3). I installed it, but don't see any difference in the .tap output yet, all tests still fail. Also when I try to run the pyTest.py program on its own or through the runTests.py.t script it fails:

tux% ./runTests.py
Warning: TOP not set. Using default value of '..'
Cannot find the gateway executable to test ../../bin/linux-x86_64/gateway

I think that error message is wrong, it doesn't actually set a default value at all (and if it did it should be '../..' when running from the O.<host> directory).

Now executing runTests.py with --verbose I get this to start with:

tux$ TOP=../.. ./runTests.py --verbose
DBE_VALUE monitor on an ai - value changes generate events. ... Starting the IOC using
softIoc -d test.db
Warning: IOC is booting with TOP = "../.."
          but was built with TOP = "/home/phoebus3/ANJ/epics/base/3-14-dev"
filename="../dbLexRoutines.c" line number=240
No such file or directory dbRead opening file test.db
Starting the CA Gateway using
../../../bin/linux-x86_64/gateway -sip localhost -sport 12783 -cip localhost -cport 12782 -access access.txt -pvlist pvlist.txt -archive -prefix gwtest
ERROR
...

I copied the test.db file into the O.<host> directory (see my previous warning about the circular dependency for why it wasn't being installed) and now it gets further, but still fails everything:

tux$ TOP=../.. ./runTests.py
EEEEEEE
======================================================================
ERROR: DBE_VALUE monitor on an ai - value changes generate events.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/local/anj/dbe_props/testTop/pyTestsApp/O.linux-x86_64/DBEValueTest.py", line 19, in setUp
    os.environ["EPICS_CA_ADDR_LIST"] =
        "localhost:{} localhost:{}".format(gwtests.iocPort,gwtests.gwPort)
ValueError: zero length field name in format
...

I don't know how to go about fixing that, my python-foo is not strong enough.

It also left my terminal in a bad state; I had to run 'stty sane' to restore it. That's because your stop() routine is terminating the IOC process that in my case is waiting inside readline() (which wants to do key echoing itself). You could avoid that problem by giving the IOC a private stream for stdin and just closing that stream when you want the IOC to exit (or send it an 'exit' command and then close the stream) and waiting for the process to die.

Alternatively about a year ago I modified the base command-line history stuff to allow readline to be disabled using an environment variable, but I haven't merged my ioc-test-module branch that its in yet. I could pull out and merge that particular change if you thing it would be worthwhile.

« Back to merge proposal