Blender Git Loki
Git Commits -> Revision ad0b2c8
Revision ad0b2c8 by Arystanbek Dyussenov (master) July 7, 2009, 08:38 (GMT) |
Integrated unit testing framework with scons on Linux. I needed this to make sure that BKE_copy_images works properly, probably will be useful in future. Using Check framework (http://check.sourceforge.net/doc/check.html/index.html). WITH_BF_UNIT_TEST option builds 'alltest' program under [BUILDDIR]/bin, which, when executed, runs unit tests, currently only 1. Example output: ---------------------------------------------------------------------- Running suite(s): Image 0%: Checks: 1, Failures: 1, Errors: 0 tests/alltest.c:74:F:Core:test_copy_images:0: Expected //bar/image.png to be translated to /tmp/bar/image.png, got /tmp/bar/image.pn. ---------------------------------------------------------------------- Spent lots of time (a couple of days actually :) to figure out how to link the test program with Blender libraries. As it turned out there are circular dependencies among Blender libraries. GCC by default doesn't expect circular dependencies - dependant libs should precede libs they depend on. The magical --start-group linker option helped to solve this (http://stephane.carrez.free.fr/doc/ld_2.html#IDX122). Also: - added bpy.util module. bpy.sys.* functions will move here later - added bpy.util.copy_images that uses BKE_copy_images - export_obj.py uses bpy.util.copy_images |
Commit Details:
Full Hash: ad0b2c87d5c86b56f073c81f25df5c3988911d14
SVN Revision: 21402
Parent Commit: 2a23fda
Lines Changed: +290, -14
9 Modified Paths:
/release/io/export_obj.py (+13, -10) (Diff)
/SConstruct (+10, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+6, -0) (Diff)
/source/blender/blenkernel/intern/image.c (+117, -0) (Diff)
/source/blender/blenkernel/SConscript (+3, -0) (Diff)
/source/blender/python/intern/bpy_interface.c (+3, -0) (Diff)
/source/blender/python/intern/bpy_util.c (+131, -2) (Diff)
/source/blender/python/intern/bpy_util.h (+2, -0) (Diff)
/tools/btools.py (+5, -1) (Diff)
/SConstruct (+10, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+6, -0) (Diff)
/source/blender/blenkernel/intern/image.c (+117, -0) (Diff)
/source/blender/blenkernel/SConscript (+3, -0) (Diff)
/source/blender/python/intern/bpy_interface.c (+3, -0) (Diff)
/source/blender/python/intern/bpy_util.c (+131, -2) (Diff)
/source/blender/python/intern/bpy_util.h (+2, -0) (Diff)
/tools/btools.py (+5, -1) (Diff)