|
| 1 | +@ECHO OFF |
| 2 | +SETLOCAL |
| 3 | +:: |
| 4 | +:: Copyright (C) 2024 David Cattermole. |
| 5 | +:: |
| 6 | +:: This file is part of mmSolver. |
| 7 | +:: |
| 8 | +:: mmSolver is free software: you can redistribute it and/or modify it |
| 9 | +:: under the terms of the GNU Lesser General Public License as |
| 10 | +:: published by the Free Software Foundation, either version 3 of the |
| 11 | +:: License, or (at your option) any later version. |
| 12 | +:: |
| 13 | +:: mmSolver is distributed in the hope that it will be useful, |
| 14 | +:: but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | +:: GNU Lesser General Public License for more details. |
| 17 | +:: |
| 18 | +:: You should have received a copy of the GNU Lesser General Public License |
| 19 | +:: along with mmSolver. If not, see <https://www.gnu.org/licenses/>. |
| 20 | +:: --------------------------------------------------------------------- |
| 21 | +:: |
| 22 | +:: Runs tests via the Maya Python Interpreter. |
| 23 | +:: |
| 24 | +:: NOTE: This file is intended as a short-cut rather than having to |
| 25 | +:: find and type the full path to 'mayapy.exe' on Windows. On Linux, |
| 26 | +:: `mayapy` should be set for your environment (assuming you have an |
| 27 | +:: environment managed). |
| 28 | + |
| 29 | + |
| 30 | +:: The root of this project. |
| 31 | +SET PROJECT_ROOT=%CD% |
| 32 | +ECHO Project Root: %PROJECT_ROOT% |
| 33 | + |
| 34 | +:: Path to Maya Python interpreter. |
| 35 | +SET MAYA_EXE="%PROGRAMFILES%\Autodesk\Maya2026\bin\mayapy.exe" |
| 36 | + |
| 37 | +:: Run tests. |
| 38 | +%MAYA_EXE% %PROJECT_ROOT%\tests\runTests.py %* |
| 39 | +if errorlevel 1 goto tests_failed |
| 40 | + |
| 41 | +:: Successful return. |
| 42 | +exit /b 0 |
| 43 | + |
| 44 | +:tests_failed |
| 45 | +echo mmSolver tests failed! |
| 46 | +exit /b 1 |
0 commit comments