Skip to content
Snippets Groups Projects

Add initial version of the integration testing class

Merged m.marn requested to merge 106-integration-test into master
1 file
+ 77
18
Compare changes
  • Side-by-side
  • Inline
  • f1db74ec
    silecsTypeTester.sh improvements: · f1db74ec
    al.schwinn authored
    - Improved readibillty and details for all user-interactions
    - Dropped few commands which were not required
    - Fixed some irrelevant commands
    - Automatic symlink creation
+ 77
18
@@ -3,6 +3,8 @@
set -e
SCRIPT_PATH=$(dirname $(readlink -f "$0"))
TESTING_FEC=vmla016
RELEASE_PATH=/common/export/fesa/local/${TESTING_FEC}/AllTypesFESA_DU/
cd $SCRIPT_PATH/../
@@ -22,30 +24,87 @@ RELATIVE_PATH=$(dirname "$0")
silecs -g $RELATIVE_PATH/AllTypesFESA $RELATIVE_PATH/AllTypesFESA_DU
fesa3 -v $RELATIVE_PATH/AllTypesFESA/src/AllTypesFESA.design
fesa3 -v $RELATIVE_PATH/AllTypesFESA_DU/src/AllTypesFESA_DU.deploy
echo -e "\n"
echo -e "Make sure that the <path> element inside AllTypesFESA_DU.deploy contains the correct absolute path to the Fesa class.\n"
read -p "Press any key to start fesa-codegen and build the Fesa binary"
echo -e "\n"
yocto-fesa3 -c $RELATIVE_PATH/AllTypesFESA gen
yocto-fesa3 -c $RELATIVE_PATH/AllTypesFESA build
yocto-fesa3 -d $RELATIVE_PATH/AllTypesFESA_DU release -f vmla016 -e int
yocto-fesa3 -c $RELATIVE_PATH/AllTypesFESA -d $RELATIVE_PATH/AllTypesFESA_DU gen
yocto-fesa3 -c $RELATIVE_PATH/AllTypesFESA -d $RELATIVE_PATH/AllTypesFESA_DU build
silecs -r $SCRIPT_PATH/AllTypesFESA_DU -e int
echo -e "\n"
echo -e "Load the device-mode scl on the PLC (Make sure that the correct DB-Numbers are used (DB1000 and DB1001).\n"
echo -e "Modify DB-Numbers if required .. moe info here: https://www-acc.gsi.de/wiki/Frontend/Upload_Controller_Siemens"
echo -e "Connect to thePLC and update/run the software changes"
read -p "Press any key to continue"
echo -e "\n"
echo -e "\n"
echo -e "Make sure that the instance file only contains the one device-mode device.\n"
read -p "Press any key to continue to release the fesa files to the testing FEC"
echo -e "\n"
cp $RELATIVE_PATH/AllTypesFESA_DU/hosts /common/export/fesa/local/vmla016/AllTypesFESA_DU/
yocto-fesa3 -d $RELATIVE_PATH/AllTypesFESA_DU release -f ${TESTING_FEC} -e int
silecs -r $SCRIPT_PATH/AllTypesFESA_DU -e int
echo "Load the device-mode scl on the PLC and startup the FESA class configure with device-mode device. Make sure that the instance file only contains the one device-mode device."
echo "To start on yocto systems, use the systemd fesa tools. systemctl start fesa@AllTypesFESA_DU, systemctl status fesa@AllTypesFESA_DU, journalctl -u fesa@AllTypesFESA_DU"
echo "Make sure tsts7001-device and tsts7001-block are resolved to tsts7001, by specifying export HOSTALIASES=/opt/fesa/nfs/local/vmla016/AllTypesFESA_DU/hosts,"\
"An alternative if you can not get systemd to work is to rename the PLC in the FESA instance file to tsts7001 and rename the tsts7001-*.silecsparam file to tsts7001.silecsparam within /etc/fesa/params/"
echo "If you wish to avoid testing with systemd tools, you can synchronize the class and copy over startManually_AllTypesFESA_DU_M.sh. Since this is not done automatically by the fesa yocto release scripts"
read -p "Then press any key to continue"
#Make sure to link the device-mode param file
rm -rf ${RELEASE_PATH}/tsts7001.silecsparam
ln -s ${RELEASE_PATH}/tsts7001-device.silecsparam ${RELEASE_PATH}/tsts7001.silecsparam
echo -e "\n"
echo -e "Now start the binary using the systemd fesa tools/the init script:\n"
echo -e "\tStop the class, if it is still running\n"
echo -e "\t\tsystemctl stop fesa@AllTypesFESA_DU\n"
echo -e "\tExecute the silecs init script to update the files to run:\n"
echo -e "\t\t/opt/nfsinit/vmla016/50_silecs\n"
echo -e "\tCheck for errors:\n"
echo -e "\t\tsystemctl status fesa@AllTypesFESA_DU\n"
echo -e "\t\tjournalctl -u fesa@AllTypesFESA_DU\n"
echo -e "(If you wish to avoid testing with systemd tools, you can synchronize the class and copy over startManually_AllTypesFESA_DU_M.sh. Since this is not done automatically by the fesa yocto release scripts)\n"
read -p "Press any key to continue to run the cmw-tester in device mode"
echo -e "\n"
$SCRIPT_PATH/cmwTester.py --int
echo "Load the device-mode scl on the PLC and startup the FESA class configure with block-mode device. Make sure that the instance file only contains the one block-mode device."
echo "To start on yocto systems, use the systemd fesa tools. systemctl start fesa@AllTypesFESA_DU, systemctl status fesa@AllTypesFESA_DU, journalctl -u fesa@AllTypesFESA_DU"
echo "Make sure tsts7001-device and tsts7001-block are resolved to tsts7001, by specifying export HOSTALIASES=/opt/fesa/nfs/local/vmla016/AllTypesFESA_DU/hosts,"\
"An alternative if you can not get systemd to work is to rename the PLC in the FESA instance file to tsts7001 and rename the tsts7001-*.silecsparam file to tsts7001.silecsparam within /etc/fesa/params/"
read -p "Then press any key to continue"
echo -e "\n"
echo -e "Congratulation, the integration test for device-mode finished without errors\n"
read -p "Press any key to exit this script"
echo -e "\n"
echo -e "\n"
echo -e "Now Load the block-mode scl on the PLC (Make sure that the correct DB-Numbers are used (DB2000 ... DB2004).\n"
echo -e "Modify DB-Numbers if required .. moe info here: https://www-acc.gsi.de/wiki/Frontend/Upload_Controller_Siemens"
echo -e "Connect to thePLC and update/run the software changes"
read -p "Press any key to continue"
echo -e "\n"
echo -e "\n"
echo -e "Make sure that the instance file only contains the one block-mode device.\n"
read -p "Press any key to continue to release the fesa files to the testing FEC"
echo -e "\n"
yocto-fesa3 -d $RELATIVE_PATH/AllTypesFESA_DU release -f ${TESTING_FEC} -e int
#Make sure to link the block-mode param file
rm -rf ${RELEASE_PATH}/tsts7001.silecsparam
ln -s ${RELEASE_PATH}/tsts7001-block.silecsparam ${RELEASE_PATH}/tsts7001.silecsparam
echo -e "\n"
echo -e "Now start the binary using the systemd fesa tools/the init script:\n"
echo -e "\tStop the class, if it is still running\n"
echo -e "\t\tsystemctl stop fesa@AllTypesFESA_DU\n"
echo -e "\tExecute the silecs init script to update the files to run:\n"
echo -e "\t\t/opt/nfsinit/vmla016/50_silecs\n"
echo -e "\tCheck for errors:\n"
echo -e "\t\tsystemctl status fesa@AllTypesFESA_DU\n"
echo -e "\t\tjournalctl -u fesa@AllTypesFESA_DU\n"
echo -e "(If you wish to avoid testing with systemd tools, you can synchronize the class and copy over startManually_AllTypesFESA_DU_M.sh. Since this is not done automatically by the fesa yocto release scripts)\n"
read -p "Press any key to continue to run the cmw-tester in block mode"
echo -e "\n"
$SCRIPT_PATH/cmwTester.py --int --block-mode
echo -e "\n"
echo -e "Congratulation, the integration test for block-mode finished without errors\n"
read -p "Press any key to exit this script"
echo -e "\n"
Loading