利用者:Jaguarandi/SummerOfCode2009/BlenderTest

提供: wiki
移動先: 案内検索

Blender Test

With the purpose to easy the test of the SoC project and help finding optimizaton directions, a python script has been developped.

A sample html output can be seen at: http://andresp.no-ip.org/soc2009/btest/html/render.html

Source code: https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-jaguarandi/test

Concepts

This test script uses 4 concepts:

machine

current machine (configured on config.py)

build

a blender binary (*.bin) (given as argument)

case

A .blend scene (*.blend) (given as argument)

test-run

A test-run is the result of running a build against a scene on a given machine test-run results are saved on:

<config.run_path>/<machine_hash>/<build_hash>/<case_hash>/result.xml
<config.run_path>/<machine_hash>/<build_hash>/<case_hash>/1.png

and save information like: time, stderr, stdout, exit_code, image result


Usage

blendertest.py <action> <paths>

  • all .blend found while walking the paths are considered as a test case
  • all .bin found while walking the paths are considered builds

action can be one of:

--update (run tests cases on the given builds/cases)
--html   (outputs a comparison table between the given builds/cases)

as so running builds against test case can be as simple as:

blendertest.py --update <paths_with_cases> <paths_with_builds>
blendertest.py --update case/test249/render build/rev12345.bin

to generate an html comparison use:

blendertest.py --html <path_with_cases> <paths_with_builds>
bendertest.py --html build/ case/ > html/all.html