[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29010] branches/soc-2010-leifandersen/ tests: 1.

Leif Andersen leif.a.andersen at gmail.com
Wed May 26 21:34:17 CEST 2010


Revision: 29010
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29010
Author:   leifandersen
Date:     2010-05-26 21:34:17 +0200 (Wed, 26 May 2010)

Log Message:
-----------
1.  Fixed bug where CTest wasn't actually running the PyUnit tests.

2.  Added test target, so make test should work.

3.  Expanded the Google Test test.  It's still part of the main project though, adding it's own executable.

4.  Added the Google Test as a part of CTest.

Modified Paths:
--------------
    branches/soc-2010-leifandersen/tests/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/gtest/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/pyunit/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/pyunit/data/CMakeLists.txt
    branches/soc-2010-leifandersen/tests/pyunit/data/scenes.py

Modified: branches/soc-2010-leifandersen/tests/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/CMakeLists.txt	2010-05-26 18:23:52 UTC (rev 29009)
+++ branches/soc-2010-leifandersen/tests/CMakeLists.txt	2010-05-26 19:34:17 UTC (rev 29010)
@@ -1,4 +1,5 @@
 ENABLE_TESTING()
+ADD_CUSTOM_TARGET(test COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS blender)
 
 add_subdirectory(gtest)
 add_subdirectory(pyunit)

Modified: branches/soc-2010-leifandersen/tests/gtest/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/gtest/CMakeLists.txt	2010-05-26 18:23:52 UTC (rev 29009)
+++ branches/soc-2010-leifandersen/tests/gtest/CMakeLists.txt	2010-05-26 19:34:17 UTC (rev 29010)
@@ -1,5 +1,7 @@
 CMAKE_POLICY(SET CMP0010 NEW)
 
+ADD_SUBDIRECTORY(blenlib)
+
 # For Google Test
 # Where gtest's .h files can be found.
 include_directories(
@@ -67,7 +69,7 @@
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 # Setup the exe sources and buildinfo
-SET(EXESRC blendertests.cpp teststubs.c sampletest.cpp)
+SET(EXESRC blendertests.cpp teststubs.c sampletest.cpp blenlib/BLI_math_base_test.cpp)
 
 IF(WIN32)
 	SET(EXESRC ${EXESRC} ${Blender_SOURCE_DIR}/source/icons/winblender.rc)
@@ -207,3 +209,9 @@
 #ENDIF(UNIX)
 
 SETUP_LIBLINKS(blendertests)
+
+#----------------------------------
+# CTest Integrated
+# TODO, once done, move into the main body of the file.
+
+ADD_TEST(GoogleTests ${Blender_BINARY_DIR}/bin/blendertests)

Modified: branches/soc-2010-leifandersen/tests/pyunit/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/pyunit/CMakeLists.txt	2010-05-26 18:23:52 UTC (rev 29009)
+++ branches/soc-2010-leifandersen/tests/pyunit/CMakeLists.txt	2010-05-26 19:34:17 UTC (rev 29010)
@@ -5,4 +5,3 @@
 add_subdirectory(props)
 add_subdirectory(types)
 add_subdirectory(utils)
-#add_executable(RunTests runtests.c)

Modified: branches/soc-2010-leifandersen/tests/pyunit/data/CMakeLists.txt
===================================================================
--- branches/soc-2010-leifandersen/tests/pyunit/data/CMakeLists.txt	2010-05-26 18:23:52 UTC (rev 29009)
+++ branches/soc-2010-leifandersen/tests/pyunit/data/CMakeLists.txt	2010-05-26 19:34:17 UTC (rev 29010)
@@ -1,4 +1,5 @@
-add_test(DataMeshTest ${Blender_BINARY_DIR}/bin/blender -b -P {Blender_SOURCE_DIR}/tests/pyunit/meshes.py)
+add_test(DataMeshTest ${Blender_BINARY_DIR}/bin/blender -b -P ${Blender_SOURCE_DIR}/tests/pyunit/data/meshes.py)
+set_tests_properties(DataMeshTest PROPERTIES PASS_REGULAR_EXPRESSION "OK")
 
-add_test(DataSceneTest ${Blender_BINARY_DIR}/bin/blender -b -P {Blender_SOURCE_DIR}/tests/pyunit/scenes.py)
-set_tests_properties(DataSceneTest PROPERTIES PASS_REGULAR_EXPRESSION "Foo")
+add_test(DataSceneTest ${Blender_BINARY_DIR}/bin/blender -b -P ${Blender_SOURCE_DIR}/tests/pyunit/data/scenes.py)
+set_tests_properties(DataSceneTest PROPERTIES PASS_REGULAR_EXPRESSION "OK")

Modified: branches/soc-2010-leifandersen/tests/pyunit/data/scenes.py
===================================================================
--- branches/soc-2010-leifandersen/tests/pyunit/data/scenes.py	2010-05-26 18:23:52 UTC (rev 29009)
+++ branches/soc-2010-leifandersen/tests/pyunit/data/scenes.py	2010-05-26 19:34:17 UTC (rev 29010)
@@ -126,9 +126,6 @@
         except IndexError:
             pass
 
-#    def test_fail(self):
-#        self.fail("Don't Panic")
-
 def rand_pos_int():
     return random.randint(0, 2000)
 





More information about the Bf-blender-cvs mailing list