Commit Graph

21 Commits

Author SHA1 Message Date
Sean Kim
f77b1e871d Tests: Add UI tests that verify loading all default workspaces
While individual modes have UI tests related to undo, this new set of
tests in this new file is intended to be a set of very broad sanity
tests that catch the most egregious errors that cause crashing on start
up, whether due to python errors, UI rendering issues, or otherwise.

Running these tests takes approximately 4 seconds currently as it adds
and verifies the loading of each of the workspaces available "out of
the box" to a blender user.

Pull Request: https://projects.blender.org/blender/blender/pulls/139318
2025-06-12 20:27:38 +02:00
Campbell Barton
62ab0837b3 Cleanup: exclude code_layout_diagram.py from mypy check
Also update bl_run_operators.py based as #136156 is fixed.
2025-04-03 13:51:52 +11:00
Campbell Barton
bf87333701 Correct redundant call in bl_run_operators.py
Also correct type in comment.
2025-03-20 13:33:53 +11:00
Campbell Barton
858862657f Tests: improvements to bl_run_operators.py, update suppression list
- The context setup functions now reset the file to factory settings
  before setting up the context - for a predictable context.
- Split operator suppression lists into groups based on the reason
  for being disabled to avoid having to note this in code-comments.
- The suppression list is validated, warning if items aren't used.
- Disable operators which crash in background-mode which don't have
  obvious fixes & aren't useful in background-mode.
2025-03-20 13:16:47 +11:00
Campbell Barton
e4bd387327 Tests: various improvements to the bl_run_operators.py utility
- Use command line arguments to configure options such as random seed,
  running operators on existing blend files & how often the file is
  reset to the initial state.
- Support for generating a script file to replay the actions,
  useful for creating a repeatable script for bug reports.
- Add new context setup functions for edit-mode grease-pencil & hair.
2025-03-16 19:21:15 +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
Campbell Barton
b63aebf244 Merge branch 'blender-v4.3-release' 2024-11-06 10:51:50 +11:00
Campbell Barton
3e6659ddff Tests: exclude extension operators from "run operators" utility
Don't install/manipulate extensions as part of this utility.
2024-11-06 10:49:49 +11:00
Campbell Barton
d920ef5425 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:44 +11:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
51773a41cc Tests: add options for WITH_UI_TESTS
Support launching Blender in GDB as well as displaying the wayland
session which is useful for troubleshooting tests.
2024-10-17 18:15:33 +11:00
Campbell Barton
292b39b7f4 Tests: update default library path for batch blendfile loader 2024-02-23 14:57:05 +11:00
Hans Goudey
e90d844dd7 Cleanup: Grammar in comments
"it's own" -> "its own" again. Start new sentences properly.
2024-01-06 09:02:56 -05:00
dupoxy
e67a0b9350 Cleanup: Correct path used in example help text for bl_run_operators_event_simulate.py
It was using tests/python instead of the tests/utils directory where the script is now hosted.

Pull Request: https://projects.blender.org/blender/blender/pulls/113873
2023-11-27 23:42:12 +01:00
Campbell Barton
5ebaf8af59 Build: correct package name & code-comment for WESTON in lib/ 2023-11-09 14:57:09 +11:00
Campbell Barton
1496aa9d3e Tests: support running Blender with pre-compiled WAYLAND libraries 2023-11-07 14:15:12 +11:00
Campbell Barton
ee3da7c26c Tests: add wrapper script to launch a graphical headless session
This wrapper script can be used instead of executing "blender"
to launch blender in it's own display server which is closed
when Blender quits.
The BLENDER_BIN environment variable is used to run Blender,
forwarding arguments & passing the exit-code back to the script.

This can be used to run automated graphical-tests while still being
in background (from a user perspective).
This has the advantage that windows don't popup in the foreground,
or on servers/VM's that aren't running a graphical session.
Running many Blender instances, each in their own display server
is also supported, allowing for tests to make use of multiple jobs.

Tested with graphical undo tests which have not yet been made part of
CTests (needs further investigation).

Currently this only supports WAYLAND however it can run on X11
since it launches it's own WAYLAND compositor instance for each
Blender session. The wrapper has been written with the intention of
adding support for other back-ends in the future (if practical).

Use the WESTON compositor since it's widely available and has a
headless server, any other WAYLAND-server could likely be used without
much trouble.
2023-11-04 14:29:38 +11:00
Campbell Barton
fc8b1411cd Cleanup: correct struct comments & help text for batch loading utility 2023-09-28 14:28:12 +10:00
Campbell Barton
5126677c6f Tests: add batch blend file loading utility
Useful for finding regression in file reading as well as issues reported
by ASAN, including memory leaks.
2023-09-27 16:50:09 +10:00
Campbell Barton
01bc51e7eb Tests: move utilities into their own directory
These programs don't run as part of automated tests but can be useful
utilities for developers to expose issues or bisecting
(in the case of event simulation).
2023-09-27 16:50:09 +10:00