This adds support for Overlay tests. There are some differences with how we handle tests for other engines: - The renders are captured using `bpy.ops.render.opengl()`, but this won't work on our GPU build bots. - A single blend file can run multiple tests by outputting a txt list with the test names. - Each overlay test blend file requires a matching script file with the same name inside `tests/python/overlay/`. - To reproduce a specific test state you can run `blender "(...)/tests/data/overlay/<test>.blend" -P "(...)/tests/python/overlay/<test>.py" -- --test <test-number>`. Note: The current test permutations are WIP, so reference images are not committed to the data repo for now. Pull Request: https://projects.blender.org/blender/blender/pulls/133879
20 lines
436 B
Python
20 lines
436 B
Python
# SPDX-FileCopyrightText: 2025 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
import os
|
|
import sys
|
|
import bpy
|
|
|
|
sys.path.append(os.path.dirname(__file__))
|
|
import overlay_common
|
|
|
|
bpy.context.window.workspace = bpy.data.workspaces['Test']
|
|
|
|
ob = bpy.context.active_object
|
|
space = bpy.data.screens["Default"].areas[0].spaces[0]
|
|
|
|
permutations = overlay_common.ob_modes_permutations(ob, space)
|
|
|
|
overlay_common.run_test(permutations)
|