Commit Graph

23 Commits

Author SHA1 Message Date
Bastien Montagne
da4eda148b Tests: Add basic save & reload to the 'versioning' tests.
This should allow us to catch significantly more 'sneaky' issues with
writefile and versioning codes in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140735
2025-06-21 14:06:43 +02:00
Bastien Montagne
bc80ef136e Big Endian Support Removal.
This commit implements #125759.

It removes:
* Blender does not build on big endian systems anymore.
* Support for opening blendfiles written from a big endian system is
  removed.

It keeps:
* Support to generate thumbnails from big endian blendfiles.
* BE support in `extern` or `intern` libraries, including Cycles.
* Support to open big endian versions of third party file formats:
  - PLY files.
  - Some image files (cineon, ...).

Pull Request: https://projects.blender.org/blender/blender/pulls/140138
2025-06-12 10:37:47 +02:00
Sergey Sharybin
bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00
Campbell Barton
6fcd84721c Cleanup: quiet some warnings from check_pep8 target 2025-02-04 14:51:17 +11:00
Campbell Barton
4f1817cc18 Cleanup: declare __all__ for Python scripts
Declare all to make public public API's explicit and
help detect unused code.
2025-01-06 16:45:36 +11:00
Bastien Montagne
2040b8e864 Re-enable big endian versioning tests for MacOS.
As can be seen in https://builder.blender.org/admin/#/builders/134/builds/8983 and https://builder.blender.org/admin/#/builders/135/builds/8835, MacOS buildbots ran these tests 101 times without any issue. b0eeae782eba7f5 can be used to do that test again locally if needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/132273
2024-12-24 11:54:54 +01:00
Bastien Montagne
b35a5df8c9 tests: blendfile versionning: split in more tests, flush debug prints.
In case the process creashes, the prints about blendfiles being
processed could fail to be captured by the test framework.

And split these tests in 32 slices now, 8 was becomming way too slow to
complete for each test.
2024-11-05 15:01:14 +01:00
Campbell Barton
e79b901cc5 Docs: add code-comment that bl_blendfile_versioning can fail randomly 2024-09-13 14:15:40 +10:00
Bastien Montagne
3d2408fb4e Tests: blendfile versioning: print loaded file/linked ID by default.
This makes the logs fairly verbose, but it is not displayed by default
anyway, and it is the only easy way to find out exactly which file or ID
is breaking the test.
2024-09-05 14:29:40 +02:00
Campbell Barton
352c69f437 Revert "Tests: only disable big endian checks on macOS/x64"
This reverts commit 9786d7603a.

While the test passed when I checked, it's unreliable enough to keep
disabled.
2024-09-05 20:40:36 +10:00
Campbell Barton
9786d7603a Tests: only disable big endian checks on macOS/x64 2024-09-05 15:10:56 +10:00
Campbell Barton
16df642c2a Tests: exclude big-endian tests on macOS
In preparation for adding big-endian tests, disable them on macOS
where many are failing, although it looks like the cause of failure
may not relate to endian conversion, it needs further investigation.
2024-09-05 13:07:03 +10:00
Campbell Barton
4a9d67df0e Cleanup: format tests 2024-09-05 13:07:03 +10:00
Falk David
40a739e800 Cleanup: Formatting 2024-05-10 17:58:56 +02:00
Bastien Montagne
7629182c62 Unittests: blendfile versioning: Add Link and Append basic tests.
These are really basic testing as well, merely linking or appending the
first collection or object in all processed blendfiles. But it should
help catching 'rare' issues in linking/appending from older blendfiles.
2024-05-10 16:00:30 +02:00
Bastien Montagne
3c14067ecd Unittests: 'versioning' py test: generate multiple instances to parallelize it.
The `io_blendfile_versioning` test is currently one of the slowest
(excluding Cycles ones) in debug builds, it can easily take several
minutes to complete.

This commit split it into several instances, each processing a subset of
all the blendfiles.

This gives a strong speed-up when only running that specific test.
As expected, speedup is neglectable when running the whole test suite
though.

| instances | debug  | release | debug all* | release all |
| --------- | ------ | ------- | ---------- | ----------- |
|         1 | 190.95 |   19.39 |     439.54 |       63.51 |
|         4 |  61.80 |    6.81 |        N/A |         N/A |
|         8 |  38.33 |    5.14 |     435.00 |       58.93 |
|        16 |  33.97 |    4.16 |        N/A |         N/A |
|        32 |  46.54 |    5.14 |        N/A |         N/A |

Times are in seconds.
`instances` are the number of tests generated (1 is same as before this
commit).
The first two columns are timings for running the versioning test only,
the last two are timings for the full test suite (excluding Cycles tests
in the debug build case).
2024-05-10 16:00:30 +02:00
Campbell Barton
06adfcaf38 Cleanup: unused imports 2024-04-19 16:09:30 +10:00
Brecht Van Lommel
056becae8a Merge branch 'blender-v4.1-release' into main 2024-02-22 14:36:13 +01:00
Brecht Van Lommel
8dfb87d1af Fix: Update tests data path to new directory 2024-02-22 14:25:54 +01:00
Brecht Van Lommel
0f2064bc3b Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was 4bf6a2e564.
2024-02-19 15:59:59 +01:00
Campbell Barton
2119d271e0 Cleanup: remove "-noaudio" argument in background mode
This is no longer needed as background mode implies -noaudio.
2024-02-14 00:13:38 +11:00
Brecht Van Lommel
61f982f0d1 Cleanup: make format 2023-10-04 21:30:41 +02:00
Bastien Montagne
3d5c6dc218 Tests: Add test to open all blendfiles in current /lib/tests/ repository.
This is fairly brute force and rough, but there are quite a few old
files in there, helps a bit with versioning and readfile code testing.

Note: Five files are currently excluded since failing in debug builds
at least, most of the time for memleaks issues. The two other 'errors'
may also not be actual issues, but this needs to be investigated further.

Also, in the future, when time allows, it may be better to generate a
set of dedicated testing files, with as many official releases versions
as possible?

Re. #112649.
2023-10-04 14:15:06 +02:00