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:
@@ -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(
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user