Page MenuHome

Tests: Add render tests for Cycles
ClosedPublic

Authored by Sergey Sharybin (sergey) on Jan 20 2015, 8:24 PM.

Details

Summary

The idea is to use the set of really small images from the lib folder
and run Cycles render on them comparing render output to reference
images in the tests repository.

For sure same thing could become more generic for BI or Freestyle
render engines.

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) retitled this revision from to Tests: Add render tests for Cycles.
Sergey Sharybin (sergey) updated this object.

Main issue here is that ctest does not currently let you to run blender binary with Cycles support. This is because system scripts are redirected to blender.git/release/scripts making it impossible to load Cycles addon which is in blender.git/intern/cycles/blender.

Perhaps easiest solution here would be to use system scripts from the install directory, making it required to run install target first? Maybe there are other ways to deal with that? Wouldn't mind if there'll be a clear way to use Cycles without installation..

Removed unrelated change

Campbell Barton (campbellbarton) requested changes to this revision.Jan 21 2015, 4:43 AM
Campbell Barton (campbellbarton) edited edge metadata.

Think it maybe good to do a temp branch to finalize this... there are a few small changes I'd suggest as well as resolving cycles import issue.

tests/python/cycles_render_tests.py
13

should use os.path.join() for win32 compat..

18

good to add -noaudio here too.

28

If an expection is ambiguous, I normally like to print the exception so strange errors dont pass un-noticed.

36

Not a big deal, but would use:

os.path.splitext(filename)[0]
62

prefer using comma separators, a bit less verbose.
eg:

print(testname, spacer, end=" ")

for other print's too

76

Normally I prefer to split out path walking into a generator function.

Makes logic easier to follow, eg

https://developer.blender.org/diffusion/BA/browse/master/system_demo_mode/config.py$4

95

Maybe good to have an option to keep the images so you can open them and compare after running the test?

This revision now requires changes to proceed.Jan 21 2015, 4:43 AM
Sergey Sharybin (sergey) edited edge metadata.

Updates for first round of review

This revision was automatically updated to reflect the committed changes.

@Campbell Barton (campbellbarton), as discussed in phone call today moving this to the branch now. It's not totally ready for end users and need some work to make Cycles happy without installation. To make that working better to have a bit of sandbox for now.

Also, if you'll have some ideas about best way to make it all working it'll be good to hear :)

tests/python/cycles_render_tests.py
13

Done.

18

Not needed here. See TEST_BLENDER_EXE in CMakeTests.txt.

36

Done.

62

Done.

76

Done.

95

You just open failed .blend file and render in blender.

Oh, had some unpublished comments about issues being addressed :)

Anyway, will prefer to concentrate work in the branch now. Would let extract some changes to our testing framework from there. But let's talk in IRC about that.