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
AgeCommit message (Collapse)Author
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-03-04macOS/GTests: add_dependencies to fix build errorAnkit Meel
When building `install`, linking blender_test fails because test libraries do not exist. This happened on lite + Xcode. Error in {rBdcb2821292f962951e88f146cb304160f21f73da}. Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D10607
2021-02-05Cleanup: cmake indentation, white-spaceCampbell Barton
2021-02-03macOS/GTest: Fix duplicate symbol errors with some generatorsAnkit Meel
Don't force load _and_ link against a library in case linker fails to deduplicate them. https://devtalk.blender.org/t/macos-duplicate-symbol-errors/17343 Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D10294
2021-01-11Tests: run suites instead of individual test casesSybren A. Stüvel
Group all tests of a test suite into a single test command invocation. This reduces the number of invocations by `ctest` by an order of magnitude. Since rB56aa5b0d8c6b663, `bin/tests/blender_test` was run for every individual test. Having over a 1000 tests made testing slower than necessary. Individual tests can still be run if desired by invocation of `bin/tests/blender_test --gtest_filter=suitename.testname`. NOTE: For this commit to have an immediate effect, it may be necessary to remove the `tests` and `Testing` directories and some CMake files from your build directory and rebuild. Run `ctest -N` to see the list of tests; there should be less than 200. Reviewed By: sergey, LazyDodo, sebbas Maniphest Tasks: T83222 Differential Revision: https://developer.blender.org/D9649
2020-12-29Test: Add utility to do near comparison for float[2]Sergey Sharybin
2020-11-10Animation: Expand unit tests for `BKE_fcurve_active_keyframe_index()`Sybren A. Stüvel
Expand unit test for `BKE_fcurve_active_keyframe_index()` to test edge cases better. This also introduces a new test macro `EXPECT_BLI_ASSERT()`, which can be used to test that an assertion fails successfully. No functional changes to actual Blender code.
2020-09-24Fix running tests when building without portable install.Sebastian Parborg
2020-09-17CMake: clean up setting of platform specific linker flagsBrecht Van Lommel
Set flags directly on the target, and use common function for all cases. This refactoring helps with the next commit for test executables. Ref D8714
2020-08-26Tests: fail automated tests on memory leaks and other internal errorsJacques Lucke
This adds a new `--debug-exit-on-error` flag. When it is set, Blender will abort with a non-zero exit code when there are internal errors. Currently, "internal errors" includes memory leaks detected by guardedalloc and error/fatal log entries in clog. The new flag is passed to Blender in various places where automated tests are run. Furthermore, the `--debug-memory` flag is used in tests, because that makes the verbose output more useful, when dealing with memory leaks. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D8665
2020-08-19Tests: use guarded allocator in testsJacques Lucke
This helps finding memory leaks in tests. Reviewers: brecht Differential Revision: https://developer.blender.org/D8631
2020-08-10Tests: move remaining gtests into their own module foldersBrecht Van Lommel
And make them part of the blender_test runner. The one exception is blenlib performance tests, which we don't want to run by default. They remain in their own executable. Differential Revision: https://developer.blender.org/D8498
2020-08-05Fix failing USD test on macOS after becoming part of blender test runnerBrecht Van Lommel
2020-08-01Cleanup: spelling (initialized)Campbell Barton
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-31Fix blender_test runner build on the buildbot on Linux and macOSBrecht Van Lommel
Add our own copy of the gtest discovery scripts from CMake a few reasons: * Use the very latest version which supports PRE_TEST for Windows * Fix usage of [] symbols in file paths that fail with the zsh shell * Disable asan leak checker when discovering tests This means Windows also no longer requires the very latest CMake 3.18.
2020-07-31Fix build of blender_test runner on macOSBrecht Van Lommel
2020-07-31Merge branch 'blender-v2.90-release'Sergey Sharybin
2020-07-31BLI: Initial implementation of generic session UUID APISergey Sharybin
Covers basics like generation of new UUID. Also contains code needed to use the SessionUUID as a key in the Map.
2020-07-30Fix: Blender_test not working on windows.Ray Molenkamp
This bumps the minimum requirement for cmake from 3.10 to 3.18 on windows if `WITH_GTESTS` is enabled. Reviewed By: sergey brecht sybren campbellbarton Differential Revision: https://developer.blender.org/D8405
2020-07-28Merge branch 'blender-v2.90-release'Jacques Lucke
2020-07-28Cleanup: correct usage of extern-C blocks in various placesJacques Lucke
This removes extern-C blocks around other includes and adds such blocks for some headers that need them.
2020-07-27Merge remote-tracking branch 'origin/blender-v2.90-release'Sybren A. Stüvel
2020-07-27Fix USD unit test on buildbotSybren A. Stüvel
The buildbot uses a separate `CMAKE_INSTALL_PREFIX`. This means that the unit test could not find its USD JSON files in the build directory. Using `${CMAKE_INSTALL_PREFIX}` instead of `$<TARGET_FILE_DIR:blender>` solved this.
2020-07-27CTest: Fix blender_test not working on windows.Ray Molenkamp
MSVC does need the wholearchive flag but it was not set, so no tests were actually linked into the binary. Reviewed By: sybren Differential Revision: https://developer.blender.org/D8404
2020-07-26Functions: move tests closer to codeJacques Lucke
2020-07-24Merge branch 'blender-v2.90-release'Jacques Lucke
2020-07-24Allocator: make leak detection work with static variablesJacques Lucke
When definining static variables that own memory, you should use the "construct on first use" idiom. Otherwise, you'll get a warning when Blender exits. More details are provided in D8354. Differential Revision: https://developer.blender.org/D8354
2020-07-23Cleanup: unify naming between different spansJacques Lucke
2020-07-23BLI: move some tests into blenlib/testsJacques Lucke
Reviewers: sybren Differential Revision: https://developer.blender.org/D8315
2020-07-21Drivers: add lerp and clamp functions to namespace.Alexander Gavrilov
Implementation of lerp without a function requires repeating one of the arguments, which is not ideal. To avoid that, add a new function to the driver namespace. In addition, provide a function for clamping between 0 and 1 to support easy clamped lerp, and a smoothstep function from GLSL that is somewhat related. The function implementations are added to a new bl_math module. As an aside, add the round function and two-argument log to the pylike expression subset. Differential Revision: https://developer.blender.org/D8205
2020-07-20BLI: add Vector/Array.fill methodsJacques Lucke
2020-07-20Refactor: Update integer type usageJacques Lucke
This updates the usage of integer types in code I wrote according to our new style guides. Major changes: * Use signed instead of unsigned integers in many places. * C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`). * Hash values for C++ containers are 64 bit wide now (instead of 32 bit). I do hope that I broke no builds, but it is quite likely that some compiler reports slightly different errors. Please let me know when there are any errors. If the fix is small, feel free to commit it yourself. I compiled successfully on linux with gcc and on windows.
2020-07-17Cleanup: avoid static initialization order issues when accessing CPPTypesJacques Lucke
Instead of depending on static initialization order of globals use static variables within functions. Those are initialized on first use. This is every so slighly less efficient, but avoids a full class of problems.
2020-07-16Tests: disable ASAN when discovering testsSybren A. Stüvel
CMake, when it's configuring the project, runs the `blender_test` test runner (if it exists from a previous build) to discover which tests it contains. At this time none of the tests themselves are run, so it's not that useful to run ASAN and have it break things when there are memory leaks. This commit disables ASAN by injecting `ASAN_OPTIONS="detect_leaks=0"` in the environment variables. It is not enough to use `set(ENV{ASAN_OPTIONS} "detect_leaks=0")` in `tests/gtests/runner/CMakeLists.txt`, as it wouldn't be passed to the child process.
2020-07-16Tests: move tests from USD test directory into `io/common` and `io/usd`Sybren A. Stüvel
This commit is a followup of {D7649}, and ports the USD tests to the new testing approach. It moves test code from `tests/gtests/usd` into `source/blender/io/common` and `source/blender/io/usd`, and adjusts the use of namespaces to be consistent with the other tests. I decided to put one test into `io/usd/tests`, instead of `io/usd/intern`. The reason is that this test does not correspond with a single file in that directory; instead, it tests Blender's integration with the USD library itself. There are two new CLI arguments for the Big Test Runner: - `--test-assets-dir`, which points to the `lib/tests` directory in the SVN repository. This allows unit tests to find test assets. - `--test-release-dir`, which points to `bin/{BLENDER_VERSION}` in the build directory. At the moment this is only used by the USD test. The CLI arguments are automatically passed to the Big Test Runner when using `ctest`. When manually running the tests, the arguments are only required when there is a test run that needs them. For more info about splitting some code into 'common', see rB084c5d6c7e2cf8. No functional changes to the tests themselves, only to the way they are built & run. Differential Revision: https://developer.blender.org/D8314 Reviewed by: brecht, mont29
2020-07-16T73268: Link C/C++ unit tests into single executableSybren A. Stüvel
This commit introduces a new way to build unit tests. It is now possible for each module to generate its own test library. The tests in these libraries are then bundled into a single executable. The test executable can be run with `ctest`. Even though the tests reside in a single executable, they are still exposed as individual tests to `ctest`, and thus can be selected via its `-R` argument. Not yet ported tests still build & run as before. The following rules apply: - Test code should reside in the same directory as the code under test. - Tests that target functionality in `somefile.{c,cc}` should reside in `somefile_test.cc`. - The namespace for tests is the `tests` sub-namespace of the code under test. For example, tests for `blender::bke` should be in `blender::bke:tests`. - The test files should be listed in the module's `CMakeLists.txt` in a `blender_add_test_lib()` call. See the `blenkernel` module for an example. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7649
2020-07-16BLI: move safe math functions to separate headerJacques Lucke
2020-07-16BLI: add safe_divide, safe_modf and safe_logfJacques Lucke
Those are defined exactly as their corresponding functions in Cycles.
2020-07-16BLI: add safe_powf functionJacques Lucke
The same function is also used by cycles.
2020-07-15Fix signed/unsigned comparisonJacques Lucke
2020-07-13Fix: Fix build error with MSVC in BLI_span_testRay Molenkamp
span.size() returns an uint, causing a signed/unsigned comparison using 3u sidesteps the issue
2020-07-13BLI: fix constructor regression for Vector and ArrayJacques Lucke
This was introduced in rB403384998a6bb5f428e15ced5.
2020-07-11Nodes: support implicit conversions and incorrectly linked socketsJacques Lucke
2020-07-10Functions: make generic types hashableJacques Lucke
2020-07-10Functions: make generic types equality comparableJacques Lucke
2020-07-08BLI: improve constructors and conversions to spanJacques Lucke
This allows us to avoid many calls to `as_span()` methods. I will remove those in the next commit. Furthermore, constructors of Vector and Array can convert from one type to another now. I tested these changes on Linux with gcc and on Windows.
2020-07-08Cleanup: add correct license header to testsJacques Lucke
2020-07-08BLI: add disjoint set data structureJacques Lucke
This can be used to find separate islands in meshes efficiently (as is done in cycles already). Furthermore, this helps to implement some algorithms on node trees more efficiently.
2020-07-07Functions: add generic functions that output constantsJacques Lucke