Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-10-30BLI_task: Add new generic `BLI_task_parallel_iterator()`.Bastien Montagne
This new function is part of the 'parallel for loops' functions. It takes an iterator callback to generate items to be processed, in addition to the usual 'process' func callback. This allows to use common code from BLI_task for a wide range of custom iteratiors, whithout having to re-invent the wheel of the whole tasks & data chuncks handling. This supports all settings features from `BLI_task_parallel_range()`, including dynamic and static (if total number of items is knwon) scheduling, TLS data and its finalize callback, etc. One question here is whether we should provide usercode with a spinlock by default, or enforce it to always handle its own sync mechanism. I kept it, since imho it will be needed very often, and generating one is pretty cheap even if unused... ---------- Additionaly, this commit converts (currently unused) `BLI_task_parallel_listbase()` to use that generic code. This was done mostly as proof of concept, but performance-wise it shows some interesting data, roughly: - Very light processing (that should not be threaded anyway) is several times slower, which is expected due to more overhead in loop management code. - Heavier processing can be up to 10% quicker (probably thanks to the switch from dynamic to static scheduling, which reduces a lot locking to fill-in the per-tasks chunks of data). Similar speed-up in non-threaded case comes as a surprise though, not sure what can explain that. While this conversion is not really needed, imho we should keep it (instead of existing code for that function), it's easier to have complex handling logic in as few places as possible, for maintaining and for improving it. Note: That work was initially done to allow for D5372 to be possible... Unfortunately that one proved to be not better than orig code on performances point of view. Reviewed By: sergey Differential Revision: https://developer.blender.org/D5371
2019-10-28Merge branch 'blender-v2.81-release'Campbell Barton
2019-10-28CMake: add missing headers, use space before commentsCampbell Barton
2019-10-22Cleanup: clang-format, trailing spaceCampbell Barton
2019-10-20Cleanup: missing declaration warningsCampbell Barton
2019-10-10Cleanup: clang-format, spellingCampbell Barton
2019-10-09Fix Delaunay 2d valid bmesh mode bug.Howard Trickey
Wasn't checking for repeated vertices. Also, made choices of edges to keep more aesthetically pleasing.
2019-10-07Cleanup: quiet warningsCampbell Barton
2019-10-03Fix: Unit tests on windows.Ray Molenkamp
Problem was twofold 1) `GENERATOR_IS_MULTI_CONFIG` is a property not a variable so the test for it would always be false, unless you set a custom CMAKE_INSTALL_PREFIX (like the buildbot does) the unit tests would have a wrong working directory and complain about missing dlls or blender executable 2) Tests added outside of `/test` (like libmv) would have no working folder set since the variable would not be visible for them. consulted @sergey who voiced the opinion that duplicating the code to the test macro was slightly less evil than moving it to the main CMakeLists.txt
2019-09-19Fix T68091: Adding a corrupt video crashes/confuses BlenderSybren A. Stüvel
The problematic video from T68091 clearly has an invalid stream duration (it would be 55 centuries long if interpreted at 30 FPS, and given that it was recorded with an Android 9 device, it's unlikely that recording started that long ago). I've added a heuristic to check the stream duration against the container duration; if the stream is more than 4x longer than the container, Blender now falls back to the container duration. We could use MIN(stream duration, container duration), but there might be video files out there where the container duration is less precise than the stream duration; they are measured in different units of time (microseconds for the container vs. frames for the stream). Includes a unit test for the above heuristic. Reviewed by: jbakker Differential revision: https://developer.blender.org/D5853
2019-09-14BLI: make Map.add_or_modify more powerfulJacques Lucke
The function now allows custom return types defined by the callbacks. This can be useful when a user of the data structure has to implement some custom behavior.
2019-09-14BLI: rename SetVector to VectorSetJacques Lucke
The structure is a set built on top of a vector and not the other way around.
2019-09-14BLI: Improve forwarding semantics of some data structuresJacques Lucke
This makes it possible to use e.g. `std::unique_ptr` in a map.
2019-09-13BLI: add some missing methods to Map and SetVectorJacques Lucke
2019-09-13BLI: new C++ hash table data structuresJacques Lucke
This commit adds some new hashing based data structures to blenlib. All of them use open addressing with probing currently. Furthermore, they support small object optimization, but it is not customizable yet. I'll add support for this when necessary. The following main data structures are included: **Set** A collection of values, where every value must exist at most once. This is similar to a Python `set`. **SetVector** A combination of a Set and a Vector. It supports fast search for elements and maintains insertion order when there are no deletes. All elements are stored in a continuous array. So they can be iterated over using a normal `ArrayRef`. **Map** A set of key-value-pairs, where every key must exist at most once. This is similar to a Python `dict`. **StringMap** A special map for the case when the keys are strings. This case is fairly common and allows for some optimizations. Most importantly, many unnecessary allocations can be avoided by storing strings in a single buffer. Furthermore, the interface of this class uses `StringRef` to avoid unnecessary conversions. This commit is a continuation of rB369d5e8ad2bb7.
2019-09-12BLI: new StringRef and StringRefNull data structuresJacques Lucke
These two data structures reference strings somewhere in memory. They do not own the referenced string. The string is considered const. A string referenced by StringRefNull can be expected to be null-terminated. That is not the case for StringRef. This commit is a continuation of rB369d5e8ad2bb7c2.
2019-09-12BLI: new C++ ArrayRef, Vector, Stack, ... data structuresJacques Lucke
Many generic C++ data structures have been developed in the functions branch. This commit merges a first chunk of them into master. The following new data structures are included: Array: Owns a memory buffer with a fixed size. It is different from std::array in that the size is not part of the type. ArrayRef: References an array owned by someone else. All elements in the referenced array are considered to be const. This should be the preferred parameter type for functions that take arrays as input. MutableArrayRef: References an array owned by someone else. The elements in the referenced array can be changed. IndexRange: Specifies a continuous range of integers with a start and end index. IntrusiveListBaseWrapper: A utility class that allows iterating over ListBase instances where the prev and next pointer are stored in the objects directly. Stack: A stack implemented on top of a vector. Vector: An array that can grow dynamically. Allocators: Three allocator types are included that can be used by the container types to support different use cases. The Stack and Vector support small object optimization. So when the amount of elements in them is below a certain threshold, no memory allocation is performed. Additionally, most methods have unit tests. I'm merging this without normal code review, after I checked the code roughly with Sergey, and after we talked about it with Brecht.
2019-09-11Depsgraph: Pass bmain to depsgraph object creationSergey Sharybin
Currently unused, but will allow to keep of an owner of the depsgraph. Could also simplify other APIs in the future by avoiding to pass bmain explicitly to relation update functions and things like that.
2019-09-08Fix script_load_modules test failure in power sequencerBrecht Van Lommel
2019-09-07Fix GTests failing on Windows buildbotBrecht Van Lommel
Run these tests from the install directory so they can find dlls.
2019-09-07Tests: run tests from install pathBrecht Van Lommel
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.
2019-09-07Fix two bugs in delaunay blenlib function.Howard Trickey
Bugs were: (1) needed an epsilon test in CCW test in order to handle new costraint edge that intersects an existing point but only within epsilon; (2) the "valid bmesh" output mode sometimes left a face that included outside frame point.
2019-09-07Cleanup: style, spellingCampbell Barton
2019-09-07EEVEE: Fix tests crashing if file is in edit modeClément Foucault
2019-09-06Eevee: Improve Test setupClément Foucault
- Remove use_screen_refraction as it conflict with SSR and SSS - Increase GTAO distance - Add a simple lightprobe setup that works well in most cases - Enable soft shadows Baking the lightprobes adds some overhead to the test time (+33%). Reviewers: brecht Differential Revision: https://developer.blender.org/D5507
2019-08-30Cleanup: remove debug printBrecht Van Lommel
2019-08-30Tests: reorder render tests so cycles/eevee/workbench are not interleavedBrecht Van Lommel
2019-08-26Fix render test Python error on crashesBrecht Van Lommel
2019-08-15Cleanup: clang-format, unused argCampbell Barton
2019-08-15Fix CDT bug causing crash with some output modes.Howard Trickey
Forgot to properly maintain the edge for faces while dissolving edges.
2019-08-14Cleanup: clang-format, sort structs & cmake filesCampbell Barton
2019-08-14Text editor: syntax highlighting + line numbers on by defaultSybren A. Stüvel
The most common use of the text editor seems to be for scripting. Having line numbers and syntax highlighting enabled by default seems sensible. Syntax highlighting is now enabled by default, but is automatically disabled when the datablock has a non-highlighted extension. Highlighting is enabled for filenames like: - Text - Text.001 - somefile.py and is automatically disabled when the datablock has an extension for which Blender has no syntax highlighter registered. Reviewers: billreynish, campbellbarton Subscribers: brecht, billreynish Differential Revision: https://developer.blender.org/D5472
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-10Cleanup: clang-formatCampbell Barton
2019-08-10Add Constrained Delaunay Triangulation routine to Blenlib.Howard Trickey
See Design task T68277, and patch D5423. This commit includes edits by @ideasman42 to patch in branch temp-D5423-update, plus responses to his comments.
2019-08-05GTest: test cases for polyfill2d bug T67109Campbell Barton
2019-08-02Tests: also don't fail on memory leaks for gtestsBrecht Van Lommel
2019-08-02Fix broken add_python_test after recent changesBrecht Van Lommel
2019-08-02Tests: don't fail on leaks detected by leak sanitizerBrecht Van Lommel
These often happen in external libraries that we can't fix. The leaks are still printed in the logs.
2019-08-02Cleanup: refactor tests executing Blender to use add_blender_test functionBrecht Van Lommel
2019-08-02Fix scene units test failure after recent changesBrecht Van Lommel
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Fix: test object_modifier_array is passing when it shouldn't.Habib Gahbiche
From D5253.
2019-07-01Tests: Point ffmpeg data to a new folderSergey Sharybin
2019-06-28Python tests: replaced `imp` with `importlib`Sybren A. Stüvel
The `imp` module has been deprecated since Python 3.4, and is replaced by `importlib`.
2019-06-28Tests: disable keymap hierarchy tests until they are fixedBrecht Van Lommel
This is not a critical issue, and it's important to have tests always passing. Ref T65963.
2019-06-27Tests: speed up render tests by running multiple in the same processBrecht Van Lommel
Blender startup time and shader compilation is a big factor when running hundreds of tests, so now all renders in the same ctest run in the same process. This was previously reverted due to skipping other tests when one test crashed. Now if a test crashes, Blender is re-run with the remaining tests so we get results from them still.
2019-06-26Tests: put output of IO tests in subdirectoryBrecht Van Lommel
2019-06-26Tests: add navigation links for HTML test reports, and other tweaksBrecht Van Lommel
2019-06-25Fix related to T65963: Ctest: Failing test script_load_keymap passes.Bastien Montagne
Fix things to make test actually fail as expected (one cannot compare functions to strings, so no more sorting for now). Not sure how to actually fix the test though, not even sure test make any sense anymore actually, with all those weirdo gizmos and tools keymaps thingy...