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.
This commit is contained in:
Bastien Montagne
2024-11-05 14:34:25 +01:00
parent c945f1356e
commit b35a5df8c9
2 changed files with 4 additions and 4 deletions

View File

@@ -219,7 +219,7 @@ add_blender_test(
# This test can be extremely long, especially in debug builds.
# Generate BLENDFILE_VERSIONING_SPLIT_RANGE instances of the test,
# each processing their own subset of the whole set of blendfiles.
set(BLENDFILE_VERSIONING_SPLIT_RANGE 8)
set(BLENDFILE_VERSIONING_SPLIT_RANGE 32)
math(EXPR BLENDFILE_VERSIONING_SPLIT_RANGE_CMAKE "${BLENDFILE_VERSIONING_SPLIT_RANGE} - 1")
foreach(idx RANGE ${BLENDFILE_VERSIONING_SPLIT_RANGE_CMAKE})
add_blender_test(

View File

@@ -115,7 +115,7 @@ class TestBlendFileOpenAllTestFiles(TestHelper):
if self.skip_path_check(bfp):
continue
if not self.args.is_quiet:
print(f"Trying to open {bfp}")
print(f"Trying to open {bfp}", flush=True)
bpy.ops.wm.read_homefile(use_empty=True, use_factory_startup=True)
bpy.ops.wm.open_mainfile(filepath=bfp, load_ui=False)
@@ -128,11 +128,11 @@ class TestBlendFileOpenAllTestFiles(TestHelper):
with bpy.data.libraries.load(bfp, link=do_link) as (lib_in, lib_out):
if len(lib_in.collections):
if not self.args.is_quiet:
print(f"Trying to {operation_name} {bfp}/Collection/{lib_in.collections[0]}")
print(f"Trying to {operation_name} {bfp}/Collection/{lib_in.collections[0]}", flush=True)
lib_out.collections.append(lib_in.collections[0])
elif len(lib_in.objects):
if not self.args.is_quiet:
print(f"Trying to {operation_name} {bfp}/Object/{lib_in.objects[0]}")
print(f"Trying to {operation_name} {bfp}/Object/{lib_in.objects[0]}", flush=True)
lib_out.objects.append(lib_in.objects[0])
def test_link(self):