Loading Common/Servers/DewarPositioner/test/Makefile +71 −12 Original line number Diff line number Diff line #----------------------------------------- # Marco Buttu <mbuttu@oa-cagliari.inaf.it> #----------------------------------------- PY_PACKAGES = DewarPositionerMockers # 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) # USER_LIBS=C++ pthread # 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) # 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)) # INCLUDE STANDARDS # ----------------- 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" python -m unittest pyunit do_functional: @echo "running python functional tests" python -m unittest functional python -m unittest functional/commands do_external: @echo "running python external tests" python -m unittest external clean_test: rm -f results/*.xml rm -f functional/*.pyc rm -f pyunit/*.pyc rm -f external/*.pyc rm -rf ../lib/python/site-packages/* rm -rf $(INTROOT)/lib/python/site-packages/DewarPositionerMockers* 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 $(RM) *~ *Impl/*~ $(RM) ../lib/python/site-packages/* clean : clean_all clean_test @echo " . . . clean done" clean_dist : clean_all clean_dist_all clean_dist : clean_all clean_dist_all clean_test @echo " . . . clean_dist done" man : do_man Loading @@ -32,5 +93,3 @@ man : do_man install : install_all @echo " . . . installation done" #___oOo___ Common/Servers/DewarPositioner/test/README.rst +7 −9 Original line number Diff line number Diff line Loading @@ -3,12 +3,11 @@ Content of the test directory ***************************** Contents: * ``interface`` directory: contains tests * ``submodules`` directory: contains tests * ``functional`` directory: contains tests * ``pyunit`` directory: contains tests * ``dependencies`` directory: third-part dependencies * ``DewarPositionrMockers``: user defined mockers * ``no_auto``: no automatic tests * ``Makefile``: use it for installing the user defined mockers Dependencies Loading @@ -29,16 +28,16 @@ a mocker. To install this package:: Run the tests ============= The tests are located in two directories, ``interface`` and ``submodules``, and for both is mandatory that ACS is alive. In addition, the ``interface`` tests require that the ``DewarPositioner`` must be active, while the ``submodules`` The tests are located in two directories, ``functional`` and ``pyunit``, and for both is mandatory that ACS is alive. In addition, the ``functional`` tests require the ``DewarPositioner`` to be active, while the ``pyunit`` tests will use a mocker in case the component is not available. We can execute a particular test:: .. code-block: bash $ cd submodules/positioner/ $ cd pyunit/positioner/ $ ls test_offset.py test_rewind.py test_startUpdating.py test_stop.py test_init.py test_park.py test_setup.py test_status.py Loading @@ -54,7 +53,7 @@ or also all the tests inside a directory:: .. code-block: bash $ cd submodules/positioner/ $ cd pyunit/positioner/ $ unit2 discover INFO -> component not available: we will use a mock device Loading @@ -62,4 +61,3 @@ or also all the tests inside a directory:: OK .. TODO: run_all from the ``test`` directory Common/Servers/DewarPositioner/test/external/__init__.py 0 → 100644 +0 −0 Empty file added. Common/Servers/DewarPositioner/test/functional/__init__.py 0 → 100644 +0 −0 Empty file added. Common/Servers/DewarPositioner/test/functional/commands/__init__.py 0 → 100644 +0 −0 Empty file added. Loading
Common/Servers/DewarPositioner/test/Makefile +71 −12 Original line number Diff line number Diff line #----------------------------------------- # Marco Buttu <mbuttu@oa-cagliari.inaf.it> #----------------------------------------- PY_PACKAGES = DewarPositionerMockers # 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) # USER_LIBS=C++ pthread # 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) # 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)) # INCLUDE STANDARDS # ----------------- 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" python -m unittest pyunit do_functional: @echo "running python functional tests" python -m unittest functional python -m unittest functional/commands do_external: @echo "running python external tests" python -m unittest external clean_test: rm -f results/*.xml rm -f functional/*.pyc rm -f pyunit/*.pyc rm -f external/*.pyc rm -rf ../lib/python/site-packages/* rm -rf $(INTROOT)/lib/python/site-packages/DewarPositionerMockers* 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 $(RM) *~ *Impl/*~ $(RM) ../lib/python/site-packages/* clean : clean_all clean_test @echo " . . . clean done" clean_dist : clean_all clean_dist_all clean_dist : clean_all clean_dist_all clean_test @echo " . . . clean_dist done" man : do_man Loading @@ -32,5 +93,3 @@ man : do_man install : install_all @echo " . . . installation done" #___oOo___
Common/Servers/DewarPositioner/test/README.rst +7 −9 Original line number Diff line number Diff line Loading @@ -3,12 +3,11 @@ Content of the test directory ***************************** Contents: * ``interface`` directory: contains tests * ``submodules`` directory: contains tests * ``functional`` directory: contains tests * ``pyunit`` directory: contains tests * ``dependencies`` directory: third-part dependencies * ``DewarPositionrMockers``: user defined mockers * ``no_auto``: no automatic tests * ``Makefile``: use it for installing the user defined mockers Dependencies Loading @@ -29,16 +28,16 @@ a mocker. To install this package:: Run the tests ============= The tests are located in two directories, ``interface`` and ``submodules``, and for both is mandatory that ACS is alive. In addition, the ``interface`` tests require that the ``DewarPositioner`` must be active, while the ``submodules`` The tests are located in two directories, ``functional`` and ``pyunit``, and for both is mandatory that ACS is alive. In addition, the ``functional`` tests require the ``DewarPositioner`` to be active, while the ``pyunit`` tests will use a mocker in case the component is not available. We can execute a particular test:: .. code-block: bash $ cd submodules/positioner/ $ cd pyunit/positioner/ $ ls test_offset.py test_rewind.py test_startUpdating.py test_stop.py test_init.py test_park.py test_setup.py test_status.py Loading @@ -54,7 +53,7 @@ or also all the tests inside a directory:: .. code-block: bash $ cd submodules/positioner/ $ cd pyunit/positioner/ $ unit2 discover INFO -> component not available: we will use a mock device Loading @@ -62,4 +61,3 @@ or also all the tests inside a directory:: OK .. TODO: run_all from the ``test`` directory
Common/Servers/DewarPositioner/test/functional/commands/__init__.py 0 → 100644 +0 −0 Empty file added.