Loading Common/Servers/CustomLogger/config/CDB/schemas/CustomLogger.xsd +6 −3 Original line number Diff line number Diff line <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Craeted 24-05-2012 by Marco Bartolini causing problems in 2015 --> <xs:schema targetNamespace="urn:schemas-cosylab-com:CustomLogger:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-cosylab-com:CustomLogger:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:mng="urn:schemas-cosylab-com:Managment:1.0"> xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:mng="urn:schemas-cosylab-com:Managment:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="urn:schemas-cosylab-com:CDB:1.0" schemaLocation="CDB.xsd"/> <xs:import namespace="urn:schemas-cosylab-com:BACI:1.0" schemaLocation="BACI.xsd"/> <xs:import namespace="urn:schemas-cosylab-com:Managment:1.0" schemaLocation="Managment.xsd"/> Loading Common/Servers/CustomLogger/test/log_continuous +6 −3 Original line number Diff line number Diff line Loading @@ -10,15 +10,18 @@ client = PySimpleClient() log_component = client.getComponent(comp_name = "MANAGEMENT/CustomLogger", comp_idl_type = "IDL:alma/Management/CustomLogger:1.0", container_name = "LoggerContainer") print "got CustomLogger component" try: i = 0 log_component.emitLog("continuous logging starts", Management.C_INFO) log_component.emitLog("continuous logging starts", Management.C_NOTICE) while True: log_component.emitLog("continuous logging event number %d" % i, Management.C_INFO) log_component.emitLog("continuous logging event number %d" % i, Management.C_NOTICE) print i i += 1 time.sleep(0.5) except KeyboardInterrupt: log_component.emitLog("continuous logging ends", Management.C_INFO) log_component.emitLog("continuous logging ends", Management.C_NOTICE) finally: print "Closing gently" client.releaseComponent("MANAGEMENT/CustomLogger") Common/Servers/CustomLogger/tests/.discos 0 → 100644 +5 −0 Original line number Diff line number Diff line This file is here to differentiate between ACS style test directory and discos-style test. This is a discos test directory DO NOT REMOVE THIS FILE Common/Servers/CustomLogger/tests/Makefile 0 → 100644 +90 −0 Original line number Diff line number Diff line # CPP UNIT TESTING SETUP #-------------- GTEST_HOME=/usr/local/include/gtest GMOCK_HOME=/usr/local/include/gmock GTEST_LIBS=gtest gtest_main USER_INC=-I$(GTEST_HOME) -I$(GMOCK_HOME) # END OF CPP UNIT TESTING SETUP #--------------------- # DEFINE YOUR CPP UNIT TEST EXECUTABLES HERE as: # # EXECTUABLES_L = unittest # unittest_OBJECTS = unittest # unittest_LIBS = $(GTEST_LIBS) <ComponentNameImpl> EXECUTABLES_L = unittest unittest_OBJECTS = unittest unittest_LIBS = $(GTEST_LIBS) unittest_LDFLAGS = -lstdc++ -lpthread # END OF CUSTOMIZATION # do not edit below this line #---------------------------- CSOURCENAMES = \ $(foreach exe, $(EXECUTABLES) $(EXECUTABLES_L), $($(exe)_OBJECTS)) \ $(foreach rtos, $(RTAI_MODULES) , $($(rtos)_OBJECTS)) \ $(foreach lib, $(LIBRARIES) $(LIBRARIES_L), $($(lib)_OBJECTS)) MAKEDIRTMP := $(shell searchFile include/acsMakefile) ifneq ($(MAKEDIRTMP),\#error\#) MAKEDIR := $(MAKEDIRTMP)/include include $(MAKEDIR)/acsMakefile endif # TEST TARGETS #TODO: unittest(2) discover pyunit do_unit: all @echo "running cpp unit tests" ../bin/unittest --gtest_output=xml:results/cppunittest.xml do_pyunit: @echo "running python unit tests" nosetests -v pyunit do_functional: @echo "running python functional tests" nosetests -v functional do_external: @echo "running python external tests" nosetests -v external clean_test: rm -f results/*.xml rm -f functional/*.pyc rm -f pyunit/*.pyc rm -f external/*.pyc unit: do_unit @echo " . . . 'unit' done" pyunit: do_pyunit @echo " . . . 'pyunit' done" functional: do_functional @echo " . . . 'functional' done" external: do_external @echo " . . . 'external' done" # TARGETS # ------- all: do_all @echo " . . . 'all' done" clean : clean_all clean_test @echo " . . . clean done" clean_dist : clean_all clean_dist_all clean_test @echo " . . . clean_dist done" man : do_man @echo " . . . man page(s) done" install : install_all @echo " . . . installation done" Common/Servers/CustomLogger/tests/external/__init__.py 0 → 100644 +0 −0 Empty file added. Loading
Common/Servers/CustomLogger/config/CDB/schemas/CustomLogger.xsd +6 −3 Original line number Diff line number Diff line <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Craeted 24-05-2012 by Marco Bartolini causing problems in 2015 --> <xs:schema targetNamespace="urn:schemas-cosylab-com:CustomLogger:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-cosylab-com:CustomLogger:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0" xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:mng="urn:schemas-cosylab-com:Managment:1.0"> xmlns:baci="urn:schemas-cosylab-com:BACI:1.0" xmlns:mng="urn:schemas-cosylab-com:Managment:1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="urn:schemas-cosylab-com:CDB:1.0" schemaLocation="CDB.xsd"/> <xs:import namespace="urn:schemas-cosylab-com:BACI:1.0" schemaLocation="BACI.xsd"/> <xs:import namespace="urn:schemas-cosylab-com:Managment:1.0" schemaLocation="Managment.xsd"/> Loading
Common/Servers/CustomLogger/test/log_continuous +6 −3 Original line number Diff line number Diff line Loading @@ -10,15 +10,18 @@ client = PySimpleClient() log_component = client.getComponent(comp_name = "MANAGEMENT/CustomLogger", comp_idl_type = "IDL:alma/Management/CustomLogger:1.0", container_name = "LoggerContainer") print "got CustomLogger component" try: i = 0 log_component.emitLog("continuous logging starts", Management.C_INFO) log_component.emitLog("continuous logging starts", Management.C_NOTICE) while True: log_component.emitLog("continuous logging event number %d" % i, Management.C_INFO) log_component.emitLog("continuous logging event number %d" % i, Management.C_NOTICE) print i i += 1 time.sleep(0.5) except KeyboardInterrupt: log_component.emitLog("continuous logging ends", Management.C_INFO) log_component.emitLog("continuous logging ends", Management.C_NOTICE) finally: print "Closing gently" client.releaseComponent("MANAGEMENT/CustomLogger")
Common/Servers/CustomLogger/tests/.discos 0 → 100644 +5 −0 Original line number Diff line number Diff line This file is here to differentiate between ACS style test directory and discos-style test. This is a discos test directory DO NOT REMOVE THIS FILE
Common/Servers/CustomLogger/tests/Makefile 0 → 100644 +90 −0 Original line number Diff line number Diff line # CPP UNIT TESTING SETUP #-------------- GTEST_HOME=/usr/local/include/gtest GMOCK_HOME=/usr/local/include/gmock GTEST_LIBS=gtest gtest_main USER_INC=-I$(GTEST_HOME) -I$(GMOCK_HOME) # END OF CPP UNIT TESTING SETUP #--------------------- # DEFINE YOUR CPP UNIT TEST EXECUTABLES HERE as: # # EXECTUABLES_L = unittest # unittest_OBJECTS = unittest # unittest_LIBS = $(GTEST_LIBS) <ComponentNameImpl> EXECUTABLES_L = unittest unittest_OBJECTS = unittest unittest_LIBS = $(GTEST_LIBS) unittest_LDFLAGS = -lstdc++ -lpthread # END OF CUSTOMIZATION # do not edit below this line #---------------------------- CSOURCENAMES = \ $(foreach exe, $(EXECUTABLES) $(EXECUTABLES_L), $($(exe)_OBJECTS)) \ $(foreach rtos, $(RTAI_MODULES) , $($(rtos)_OBJECTS)) \ $(foreach lib, $(LIBRARIES) $(LIBRARIES_L), $($(lib)_OBJECTS)) MAKEDIRTMP := $(shell searchFile include/acsMakefile) ifneq ($(MAKEDIRTMP),\#error\#) MAKEDIR := $(MAKEDIRTMP)/include include $(MAKEDIR)/acsMakefile endif # TEST TARGETS #TODO: unittest(2) discover pyunit do_unit: all @echo "running cpp unit tests" ../bin/unittest --gtest_output=xml:results/cppunittest.xml do_pyunit: @echo "running python unit tests" nosetests -v pyunit do_functional: @echo "running python functional tests" nosetests -v functional do_external: @echo "running python external tests" nosetests -v external clean_test: rm -f results/*.xml rm -f functional/*.pyc rm -f pyunit/*.pyc rm -f external/*.pyc unit: do_unit @echo " . . . 'unit' done" pyunit: do_pyunit @echo " . . . 'pyunit' done" functional: do_functional @echo " . . . 'functional' done" external: do_external @echo " . . . 'external' done" # TARGETS # ------- all: do_all @echo " . . . 'all' done" clean : clean_all clean_test @echo " . . . clean done" clean_dist : clean_all clean_dist_all clean_test @echo " . . . clean_dist done" man : do_man @echo " . . . man page(s) done" install : install_all @echo " . . . installation done"