Added support for compositor tests. Compositor tests can be added, executed and viewed in a similar way to cycles
and other render engines tests.
Running test:
`ctest -R compositor`
Updating test:
`BLENDER_TEST_UPDATE=1 ctest -R compositor`
Viewing test results:
typically saved under `build_folder/tests/compositor/report.html`
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6334
Added a first test case for review. This will be the base for future test cases.
The current API is sufficient for what is expected for such a low level API.
One concern is that you need to trigger a save in order to update the library overrides
structure. Not expected from TD/Dev point of view.
Test cases are very important when implementing restrictive mode as it is a second evaluation mode that
has impact on the (current) permissive mode.
Reviewed By: Sebastián Barschkis, Bastien Montagne
Differential Revision: https://developer.blender.org/D10747
This checks the generated key-map data matches the result of
re-exporting and re-importing.
This shows up various inconsistencies, including:
- Unused keymaps.
- Unknown/unused data in the keymap.
- Event arguments that don't make sense.
- Event values that don't match the event type
(tweak direction on keyboard event for example).
This adds a basic set of tests for curve sampling and bevel generation.
At the moment there are basic test cases for bevels, caps, and the
filling of 2D curves, but more tests can be added in the future.
Curves are actually converted to "DispLists" for displaying them in the
viewport, so it's much simpler to rely on the mesh conversion operator
instead of building a new test framework for another data structure.
Differential Revision: https://developer.blender.org/D9958
This revision contains the following changes-
- Updated the existing testing framework for Modifiers for Regression
Testing.
- Tests for Physics modifiers and remaining Generate and Deform modifiers are added.
- The existing `ModifierSpec` is updated with backward compatibility to support Physics Modifiers.
- Now there is support for frame number and giving nested parameters for attributes.
- Some Deform modifiers required Object Operators, e.g. "Bind" in Mesh Deform, so a new class was added to support that functionality.
- A separate class for holding Particles System, they are tested by converting all the particles to mesh and joining it to the mesh they were added.
- Updated the format to add tests for Bevel, Boolean and Operators as
well.
Reviewed By: zazizizou, mont29, campbellbarton
Differential Revision: https://developer.blender.org/D8507
Blacklist a bunch of tests on the GPU, which are known to currently have
differences with CPU. These can be enabled as they are fixed or the test
is modified to give compatible results when there are known limitations.
OSL tests were also moved to their own directory since those are not
supported on the GPU.
Ref T82193
CYCLES_TEST_DEVICES is a list of devices (CPU, CUDA, OPTIX, OPENCL). It is set
to CPU only by default.
Test output is now writen to build/tests/cycles/<device>, and the HTML report
has separate report pages for the different devices, with option to compare
between CPU and GPU renders.
Various GPU tests are still failing due to CPU/GPU differences, these are to be
fixed or blacklisted still.
Ref T82193
Tests files are based on test from D8393
Test files should be in `lib\tests\sequence_editing`
These are files, I will add few more tests including animation test.
{F9155273}
Using generic tool to compare rendered vs reference image as other render engines.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9394
Don't override other `LSAN_OPTIONS` like suppression file set in
the environment variable.
Old code added in {rB38ff5064b33ccb8} and {rB5f4e99b7a2b8376}
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9207
Relax limits of FCurve Bézier handles during evaluation. FCurve handles
can be scaled down to avoid the curve looping backward in time. This
scaling was done correctly but over-carefully, posing unnecessary
limitations on the possible slope of FCurves. This commit changes the
scaling approach such that the FCurve can become near-vertical.
Bump Blender's subversion from 291.0.1 to 291.0.2 to ensure that older
animation files are correctly updated.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D8752
These were disabled in the newboolean merge commit.
This commit renables them, using the original 'FAST' solver
so that the result objects need not change.
A TODO to add more tests using the 'EXACT' solver,
though most functionality there is now covered by unit gtests.
This is for design task T67744, Boolean Redesign.
It adds a choice of solver to the Boolean modifier and the
Intersect (Boolean) and Intersect (Knife) tools.
The 'Fast' choice is the current Bmesh boolean.
The new 'Exact' choice is a more advanced algorithm that supports
overlapping geometry and uses more robust calculations, but is
slower than the Fast choice.
The default with this commit is set to 'Exact'. We can decide before
the 2.91 release whether or not this is the right choice, but this
choice now will get us more testing and feedback on the new code.
Rename test `alembic_tests` to `alembic_export_tests`, so that its name
is consistent with the Python file containing the tests,
`alembic_export_tests.py`.
No functional changes.
This uses the same framework as automated modifier tests. It adds a physics
modifier, bakes and compares vertex coordinates on the end frame.
Differential Revision: https://developer.blender.org/D7017
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.
This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:
- On Windows, the `python….exe` from the installation directory. This is
just like before this patch, except that this patch adds the
overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.
Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.
If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.
Differential Revision: https://developer.blender.org/D7395
Reviewed by: campbellbarton, mont29, sergey
This allows fast access to various arrays in the Python API.
Most notably, `image.pixels` can be accessed much more efficiently now.
**Benchmark**
Below are the results of a benchmark that compares different ways to
set/get all pixel values. I do the tests on 2048x2048 rgba images.
The benchmark tests the following dimensions:
- Byte vs. float per color channel
- Python list vs. numpy array containing floats
- `foreach_set` (new) vs. `image.pixels = ...` (old)
```
Pixel amount: 2048 * 2048 = 4.194.304
Byte buffer size: 16.8 mb
Float buffer size: 67.1 mb
Set pixel colors:
byte - new - list: 271 ms
byte - new - buffer: 29 ms
byte - old - list: 350 ms
byte - old - buffer: 2900 ms
float - new - list: 249 ms
float - new - buffer: 8 ms
float - old - list: 330 ms
float - old - buffer: 2880 ms
Get pixel colors:
byte - list: 128 ms
byte - buffer: 9 ms
float - list: 125 ms
float - buffer: 8 ms
```
**Observations**
The best set and get speed can be achieved with buffers and a float image,
at the cost of higher memory consumption. Furthermore, using buffers when
using `pixels = ...` is incredibly slow, because it is not optimized.
Optimizing this is possible, but might not be trivial (there were multiple
attempts afaik).
Float images are faster due to overhead introduced by the api for byte images.
If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}`
conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`.
While I have an idea on how it can be optimized, I do not know if it can be done
without changing its functionality slightly. Performance wise the best solution
would be to not do this conversion at all and accept byte input from the api
user directly, but that seems to be a more involved task as well.
Differential Revision: https://developer.blender.org/D7053
Reviewers: JacquesLucke, mont29
Currently this only tests the Child Of constraint. My aim is to cover
constraints with tests before they are refactored/altered.
No functional changes.
This rename is to prepare for a future addition to the unit test file.
Currently it's named "import" and I will add an export test as well. The
rename is a separate commit to easily see the difference between the
rename and the addition of another test.
No functional changes.
Patch from Habib Gahbiche (zazizizou) moves the "run operator and
compare mesh to a golden" paradigm used in bevel and boolean tests
into a general framework that separates the test specs from the
blend files. Then adds some other operator and modifier tests using
the new framework. Diff D5357.id20724.diff was applied.
New .blend files, modifiers.blend and operators.blend are needed
in the tests/modeling svn directory; those were separately committed.
Those tests are here mostsly to ensure ID name management is working as
expected (the code ensuring we never have two ilocal data-blocks of the
same type with the same name in a .blend file).
Note: Currently fails in some cases, fixes are incoming.
Note: Ideally this would be in C, but we already have too many tests
linking the whole Blender and its libraries, this is becoming a real
pain to link debug + ASAN + tests build these days... So until we find a
better way to handle those dependencies, sticking to simple python
scripts.
Blender can only be run correctly from the install path since it requires Python
scripts, dynamic libraries and other files to be present. By default the install
path is the same as the build path, so it works anyway. But on the buildbot it
isn't. There was a workaround but it failed on Windows and macOS.
Now tests run from the install path. Detecting that path for ctest is more
complicated than I would like, but I couldn't find a better solution.
Ref T69541.
Being able to compare Eevee reference images is useful for refactoring I'm
working on so might as well add them now, even if we can still improve them.
Workbench tests are just rendering the same files as Cycles and Eevee. This
doesn't really tests many workbench settings until we add tests specifically
for them, but does cover how it it handles the different object types.