PAUL SCHERRER INSTITUT
EPICS at PSI
PSIEPICSSLSSwissFELProscan

EPICS

EPICS at PSI
Software
Training

web epics.web.psi.ch

Author: Dennis Armstrong
Phone: +41 56 310 5109
Updated: 30.08.2007


Printer friendly version
 

Testing the GENESYS PSU Software

Introduction

This document describes how the GENESYS module is tested at PSI. It assumes that the test person understands EPICS and the SLS environment for software development and release.

System Requirements

Software

The operating system used for testing is required to run EPICS and the StreamDevice software.
The current version of GENESYS has been tested against the following software:-

  • StreamDevice Version 2.0
  • EPICS Version 3.14.7
  • LINUX Version 2.4.18
Later software versions should work but have not been tested.

Hardware

No specific hardware is required as the software is capable of being tested on VxWorks, Linux and RTEMS without a serial RS232/RS485 connection. Testing was done on a Cosylab MicroIOC with an extra 4 RS232 serial line card installed. A different version of the startup.script will be required if the testing is done under VxWorks.

Configuration and Setup

Checkout GENESYS from the CVS repository, change the name of the GENESYS.subs file to the name of the IOC in which this will be installed. In the example given the <IOC-NAME> is TEST-PC-1 ie TEST-PC-1_GENESYS.subs then edit this file to provide the correct value for the IOC macro parameter. This should be the name of the IOC in which this file will be installed.

Checkout SOFTMON from the CVS repository, change the name of the example.subs file to the name of the IOC in which this will be installed. ie TEST-PC-1_example.subs then edit this file to provide the correct value for the IOC macro parameter. This should be the name of the IOC which the EPICS database will be running on. Change the MODULE macro name from NEWPROJECT to GENESYS in this file.
This is required to create the EPICS bo record for the simulation mode of the hardware connected PVs.

Execute the following commands to check that the test PV,s have been created.
dbLoadTemplate <IOC-NAME>_GENESYS.subs > <IOC-NAME>_GENESYS.db and dbLoadTemplate <IOC-NAME>_example.subs > <IOC-NAME>_example.db

In the <IOC-NAME>_example.db the <IOC-NAME>:GENESYS-TST name should exist.
In the <IOC-NAME>_GENESYS.db various records should have the field SIML set to <IOC-NAME>:GENESYS-TST

Edit the startup.script file to correctly point to the protocols directory (STREAM_PROTOCOL_PATH) and the dbLoadDatabase command to point to the correct streamApp.dbd file.

Use the slsinstall program to install the GENESYS software into the test IOC.

Testing

Bootup the IOC which contains the EPICS GENESYS database. Check that the IOC booted correctly.

On the test computer start a terminal session and execute the command tail -f /var/log/messages.
This is where the test messages will appear.
Start a second terminal session and execute the command "G_GENESYS-test -C <IOC-NAME> -P PSU-01" where <IOC-NAME> is the name defined by the IOC parameter in the <IOC-NAME>_GENESYS.subs file.
The output from the test script will display the number of tests completed. The test script should execute without any errors.

To check the medm GUI start the GUI with the command :-
medm -macro "NAME=PSU-01" -x G_GENESYS.adl

Execute the test script again and observe the GUI to see changes during testing.

To check the alarm handling start the alarm handler with the command :-
alh G_GENESYS.alhInclude
Execute the test command again and observe the alarm handler GUI to see alarm actions during testing.

To aid in testing the test script can also show debugging output when the command is run as :-
G_GENESYS-test -d 1 -C <IOC-NAME> -P PSU-01
this will provide extra output in the terminal that the test script was started on.


Author: Dennis Armstrong   Phone: +41 56 310 5109   Email: dennis.armstrong@psi.ch   Updated: 30.08.2007   Source: /afs/psi.ch/project/epics/webhosting/software/streamdevice/genesys/GENESYS-testing.php