Skip to content
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies = [
# Matrix across Maya versions. All renderers (mtoa, vray, redshift) are
# installed by default on Linux and Windows.
[[envs.integ-ci.matrix]]
maya = ["2025", "2026"]
maya = ["2025", "2026", "2027"]
Comment thread
andrew-fenton marked this conversation as resolved.
Comment thread
andrew-fenton marked this conversation as resolved.
Comment thread
andrew-fenton marked this conversation as resolved.

[envs.integ-ci.env-vars]
MAYA_VERSION = "{matrix:maya}"
Expand Down
21 changes: 17 additions & 4 deletions pipeline/run-integ-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# which would match any process merely naming a Maya file.
_MAYA_PROCESS_MARKERS = ("mayapy", "maya.bin", "maya.exe")

# Must match ADAPTOR_DISPATCH_DIR in setup-runner.py, which creates these.
ADAPTOR_DISPATCH_DIR = "/usr/local/maya-adaptor-bin"
Comment thread
andrew-fenton marked this conversation as resolved.


def _log(message: str) -> None:
"""Log a cleanup message."""
Expand Down Expand Up @@ -151,11 +154,21 @@ def main():
os.environ.setdefault("redshift_LICENSE", f"7054@{license_dns}")
os.environ.setdefault("ADSKFLEX_LICENSE_FILE", f"2702@{license_dns};2701@{license_dns}")

# Linux resolves mayapy through the MAYA_VERSION dispatcher written by setup-runner.py
# Linux resolves mayapy through the MAYA_VERSION dispatcher written by setup-runner.py,
# and runs the adaptor through the dispatchers in this directory, which must precede
# the hatch env's console scripts. See _write_adaptor_dispatchers in setup-runner.py.
if system != "Windows":
os.environ["PATH"] = ADAPTOR_DISPATCH_DIR + ":" + os.environ.get("PATH", "")

pytest_args = ["mayapy", "-m", "pytest", "--no-cov", "test/integ", "-vvv", "--numprocesses=1"]
if system == "Windows":
# Maya 2027 raises an SEH exception importing OpenMaya as SYSTEM (0x800703f0,
# ERROR_NO_TOKEN). Maya handles it and the tests pass, but faulthandler dumps
# every thread each time, burying the rest of the log.
pytest_args += ["-p", "no:faulthandler"]
Comment thread
andrew-fenton marked this conversation as resolved.

try:
result = subprocess.run(
["mayapy", "-m", "pytest", "--no-cov", "test/integ", "-vvv", "--numprocesses=1"]
)
result = subprocess.run(pytest_args)
finally:
_cleanup("post-test")

Expand Down
Loading
Loading