You can run YACS tests with the "salome test" command.
It is still possible to use "make test" in the build directory.
"Install path: SALOME YACS SUPERV samples")
SET(SALOME_INSTALL_HXX2SALOME bin/HXX2SALOME_Test CACHE PATH
"Install path: SALOME HXX2SALOME Test files")
+SET(SALOME_YACS_INSTALL_TEST ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test CACHE PATH
+ "Install path: SALOME YACS Test files")
MARK_AS_ADVANCED(
SALOME_YACS_INSTALL_RES_DATA
SALOME_YACS_INSTALL_RES_SCRIPTS
SALOME_YACS_INSTALL_SAMPLES
SALOME_YACS_INSTALL_SUPERV_SAMPLES
SALOME_INSTALL_HXX2SALOME
+ SALOME_YACS_INSTALL_TEST
)
# Accumulate environment variables for YACS module
ENDIF()
ENDIF()
+# For salome test
+IF(SALOME_BUILD_TESTS)
+ SET(SALOME_YACS_INSTALL_TEST_LIB ${SALOME_YACS_INSTALL_TEST}/lib)
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${SALOME_YACS_INSTALL_TEST}
+ RENAME CTestTestfile.cmake)
+ENDIF(SALOME_BUILD_TESTS)
+
SET(SUBDIRS
${SUBDIRS_COMMON}
${SUBDIRS_KERNEL}
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
+SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
+
+SET(COMPONENT_NAME YACS)
+SET(TIMEOUT 500)
+
+SET(YACS_TEST_LIB "../lib")
+
+# Add all test subdirs
+SUBDIRS(
+ bases
+ engine
+ runtime
+ yacsloader
+ yacsloader_swig
+ )
# --- rules ---
ADD_LIBRARY(YACSDLTest ${YACSDLTest_SOURCES})
-INSTALL(TARGETS YACSDLTest EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS YACSDLTest EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_YACS_INSTALL_TEST_LIB})
ADD_EXECUTABLE(InitTests ${InitTests_SOURCES})
ADD_TEST(InitTests InitTests)
TARGET_LINK_LIBRARIES(TestBases YACSBases ${CPPUNIT_LIBRARIES} ${PTHREAD_LIBRARIES})
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(TestBases TestBases)
-SET_TESTS_PROPERTIES(TestBases PROPERTIES ENVIRONMENT "${tests_env}")
\ No newline at end of file
+SET_TESTS_PROPERTIES(TestBases PROPERTIES ENVIRONMENT "${tests_env}")
+
+# For salome test
+SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/bases)
+INSTALL(TARGETS InitTests DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(TARGETS TestBases DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ ADD_TEST(InitTests InitTests)
+ SET_TESTS_PROPERTIES(InitTests PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ )
+ ADD_TEST(TestBases TestBases)
+ SET_TESTS_PROPERTIES(TestBases PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "LD_LIBRARY_PATH=${YACS_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+ )
+ENDIF()
ADD_LIBRARY(PluginOptEvTest1 ${PluginOptEvTest1_SOURCES})
TARGET_LINK_LIBRARIES(PluginOptEvTest1 YACSlibEngine)
-INSTALL(TARGETS PluginOptEvTest1 EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS PluginOptEvTest1 EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${SALOME_YACS_INSTALL_TEST_LIB})
ADD_EXECUTABLE(TestEngine ${TestEngine_SOURCES})
TARGET_LINK_LIBRARIES(TestEngine ${_link_LIBRARIES})
TARGET_LINK_LIBRARIES(IntegrationTestEngine ${_link_LIBRARIES})
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(IntegrationTestEngine IntegrationTestEngine)
-SET_TESTS_PROPERTIES(IntegrationTestEngine PROPERTIES ENVIRONMENT "${tests_env}")
\ No newline at end of file
+SET_TESTS_PROPERTIES(IntegrationTestEngine PROPERTIES ENVIRONMENT "${tests_env}")
+
+# For salome test
+SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/engine)
+INSTALL(TARGETS TestEngine DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(TARGETS IntegrationTestEngine DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
\ No newline at end of file
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ ADD_TEST(TestEngine TestEngine)
+ SET_TESTS_PROPERTIES(TestEngine PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ )
+
+ ADD_TEST(IntegrationTestEngine IntegrationTestEngine)
+ SET_TESTS_PROPERTIES(IntegrationTestEngine PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "LD_LIBRARY_PATH=${YACS_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+ )
+ENDIF()
ADD_LIBRARY(TestComponentLocal ${TestComponentLocal_SOURCES})
TARGET_LINK_LIBRARIES(TestComponentLocal YACSlibEngine)
-INSTALL(TARGETS TestComponentLocal EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+# For salome test
+SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/runtime)
+INSTALL(TARGETS TestComponentLocal EXPORT ${PROJECT_NAME}TargetGroup
+ DESTINATION ${LOCAL_TEST_DIR}/lib/salome)
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
SET(SHELL /bin/sh)
SALOME_CONFIGURE_FILE(xmlrun_orig.sh xmlrun.sh)
ADD_TEST(NAME runtimeTest COMMAND ${SHELL} ${CMAKE_CURRENT_SOURCE_DIR}/runtimeTest.sh)
- SET_TESTS_PROPERTIES(runtimeTest PROPERTIES ENVIRONMENT "${tests_env}")
+ SET_TESTS_PROPERTIES(runtimeTest PROPERTIES ENVIRONMENT "${tests_env}")
ENDIF()
+
+INSTALL(PROGRAMS runtimeTest.sh DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xmlrun.sh DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(TARGETS runtime_echo DESTINATION ${SALOME_YACS_INSTALL_TEST_LIB})
+INSTALL(TARGETS TestRuntime DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(TARGETS runtimeTestEchoSrv DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(TARGETS echo_clt DESTINATION ${LOCAL_TEST_DIR})
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
\ No newline at end of file
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ SET(SHELL /bin/sh)
+ ADD_TEST(YacsRuntimeTest ${SHELL} ./runtimeTest.sh)
+ SET_TESTS_PROPERTIES(YacsRuntimeTest PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "LD_LIBRARY_PATH=${YACS_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+ )
+ENDIF()
pidecho=$!
echo $pidecho
-mkdir -p lib/salome
-cp libTestComponentLocal.so lib/salome
+if ! [ -f lib/salome/libTestComponentLocal.so ]
+then
+ mkdir -p lib/salome
+ cp libTestComponentLocal.so lib/salome
+fi
export TESTCOMPONENT_ROOT_DIR=`pwd`
#wait enough time to let runtimeTestEchoSrv start and register
)
# --- rules ---
+SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/yacsloader)
OMNIORB_ADD_MODULE(yacsloader_echo "${echo_IDL_FILES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}")
INSTALL(TARGETS yacsloader_echo DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(echoSrv ${echoSrv_SOURCES})
TARGET_LINK_LIBRARIES(echoSrv yacsloader_echo ${echoSrv_LIBRARIES})
-INSTALL(TARGETS echoSrv DESTINATION ${SALOME_INSTALL_BINS})
ADD_LIBRARY(TestOptLoop ${TestOptLoop_SOURCES})
TARGET_LINK_LIBRARIES(TestOptLoop yacsloader_echo YACSlibEngine)
ADD_TEST(NAME YacsLoaderTest COMMAND ${SHELL} YacsLoaderTest.sh)
ENDIF()
+# For salome test
+IF(NOT WIN32)
+ SET(LOCAL_TEST_FILES
+ algoasyncexample.py
+ algosyncexample.py
+ genPascal.py
+ genTriangle.py
+ echoclt.py)
+ INSTALL(FILES ${LOCAL_TEST_FILES}
+ DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(TARGETS echoSrv TestYacsLoader
+ DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(TARGETS yacsloader_echo TestOptLoop
+ DESTINATION ${SALOME_YACS_INSTALL_TEST_LIB})
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
+ INSTALL(PROGRAMS runYacsLoaderTest.sh ${CMAKE_CURRENT_BINARY_DIR}/xmlrun.sh
+ DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_YACS_INSTALL_SAMPLES}
+ ${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}/samples )" )
+ENDIF()
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ ADD_TEST(YacsLoaderTest python ${SALOME_TEST_DRIVER} ${TIMEOUT} ./runYacsLoaderTest.sh)
+ SET_TESTS_PROPERTIES(YacsLoaderTest PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ ENVIRONMENT "LD_LIBRARY_PATH=${YACS_TEST_LIB}:$ENV{LD_LIBRARY_PATH}"
+ )
+ENDIF()
# Environment variables needed for the optimizer loop tests
export LD_LIBRARY_PATH=@CMAKE_CURRENT_BINARY_DIR@:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=../../engine/Test:$LD_LIBRARY_PATH
export PYTHONPATH=@CMAKE_BINARY_DIR@/src/engine_swig:$PYTHONPATH
export PYTHONPATH=@CMAKE_BINARY_DIR@/src/runtime_swig:$PYTHONPATH
export PYTHONPATH=@CMAKE_CURRENT_SOURCE_DIR@:$PYTHONPATH
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2006-2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# script used by "salome test" command
+./echoSrv &
+pidecho=$!
+echo $pidecho > "/tmp/YACSTEST_PidEcho"
+
+export TESTCOMPONENT_ROOT_DIR=`pwd`/../runtime
+
+./TestYacsLoader
+ret=$?
+echo "exec status TestYacsLoader " $ret
+
+kill -9 `cat "/tmp/YACSTEST_PidEcho"`
+
+exit $ret
\ No newline at end of file
<!--types -->
<!--nodes -->
- <optimizer name="b1" nbranch="4" lib="../../engine/Test/libPluginOptEvTest1" entry="PluginOptEvTest1Factory" >
+ <optimizer name="b1" nbranch="4" lib="libPluginOptEvTest1" entry="PluginOptEvTest1Factory" >
<inline name="node2" >
<script >
<code>p1= p1+10.</code>
<!--types -->
<!--nodes -->
- <optimizer name="b1" nbranch="4" lib="../../engine/Test/libPluginOptEvTest1" entry="PluginOptEvTest1Factory" >
+ <optimizer name="b1" nbranch="4" lib="libPluginOptEvTest1" entry="PluginOptEvTest1Factory" >
<bloc name="b" >
<inline name="node2" >
<script >
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
ADD_TEST(NAME StdAloneYacsLoaderTest1 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/StdAloneYacsLoaderTest1.py)
SET_TESTS_PROPERTIES(StdAloneYacsLoaderTest1 PROPERTIES ENVIRONMENT "${tests_env}")
-ENDIF()
+
+ # For salome test
+ SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/yacsloader_swig)
+ SET(LOCAL_TEST_FILES
+ StdAloneYacsLoaderTest1.py
+ testEdit.py
+ testExec.py
+ testLoader.py
+ testRefcount.py
+ testResume.py
+ testSave.py
+ testSaveLoadRun.py
+ )
+ INSTALL(FILES ${LOCAL_TEST_FILES}
+ DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(PROGRAMS runUnitTest.sh
+ DESTINATION ${LOCAL_TEST_DIR})
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_YACS_INSTALL_SAMPLES}
+ ${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}/samples )" )
+ENDIF()
--- /dev/null
+# Copyright (C) 2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ ADD_TEST(YacsLoaderTest_swig python ${SALOME_TEST_DRIVER} ${TIMEOUT} ./runUnitTest.sh)
+ SET_TESTS_PROPERTIES(YacsLoaderTest_swig PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ )
+
+ ADD_TEST(StdAloneYacsLoaderTest1 python ${SALOME_TEST_DRIVER} ${TIMEOUT} python StdAloneYacsLoaderTest1.py)
+ SET_TESTS_PROPERTIES(StdAloneYacsLoaderTest1 PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ )
+ENDIF()
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2006-2015 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# script used by "salome test" command
+../yacsloader/echoSrv &
+pidecho=$!
+echo $pidecho > "/tmp/YACSTEST_PidEcho"
+
+export TESTCOMPONENT_ROOT_DIR=`pwd`/../runtime
+
+python -m unittest discover
+ret=$?
+echo "exec status salome_test_driver " $ret
+
+kill -9 `cat "/tmp/YACSTEST_PidEcho"`
+
+exit $ret
\ No newline at end of file
#self.e.displayDot(p)
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testEdit.py\n")
-suite = unittest.makeSuite(TestEdit)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testEdit.py\n")
+ suite = unittest.makeSuite(TestEdit)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
pass
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testExec.py\n")
-suite = unittest.makeSuite(TestExec)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testExec.py\n")
+ suite = unittest.makeSuite(TestExec)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
\ No newline at end of file
pass
pass
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testLoader.py\n")
-suite = unittest.makeSuite(TestLoader)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testLoader.py\n")
+ suite = unittest.makeSuite(TestLoader)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
\ No newline at end of file
self.assert_(tc.thisown)
self.assertEqual(tc.getRefCnt(), 3)
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testRefcount.py\n")
-suite1 = unittest.makeSuite(TestContainerRef)
-suite2 = unittest.makeSuite(TestTypeCodeRef)
-suite = unittest.TestSuite((suite1, suite2))
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testRefcount.py\n")
+ suite1 = unittest.makeSuite(TestContainerRef)
+ suite2 = unittest.makeSuite(TestTypeCodeRef)
+ suite = unittest.TestSuite((suite1, suite2))
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
\ No newline at end of file
pass
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testResume.py\n")
-suite = unittest.makeSuite(TestResume)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testResume.py\n")
+ suite = unittest.makeSuite(TestResume)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
\ No newline at end of file
self.assertEqual(ls1,ls2,pb1)
self.assertEqual(ld1,ld2,pb2)
pass
-
-import os
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testSave.py\n")
-suite = unittest.makeSuite(TestSave)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testSave.py\n")
+ suite = unittest.makeSuite(TestSave)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())
\ No newline at end of file
pass
-import os,sys
-U = os.getenv('USER')
-f=open("/tmp/" + U + "/UnitTestsResult", 'a')
-f.write(" --- TEST src/yacsloader: testSaveLoadRun.py\n")
-suite = unittest.makeSuite(TestSaveLoadRun)
-result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
-f.close()
-sys.exit(not result.wasSuccessful())
+if __name__ == '__main__':
+ import os,sys
+ U = os.getenv('USER')
+ f=open("/tmp/" + U + "/UnitTestsResult", 'a')
+ f.write(" --- TEST src/yacsloader: testSaveLoadRun.py\n")
+ suite = unittest.makeSuite(TestSaveLoadRun)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
+ f.close()
+ sys.exit(not result.wasSuccessful())