-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set $MAYA_APP_DIR before running tests, to use a default maya profile #209
set $MAYA_APP_DIR before running tests, to use a default maya profile #209
Conversation
Filed as internal issue #147137. |
Hey @elrond79, at the moment we'd prefer to keep library or plugin-specific environment variables out of testWrapper.py. Can we add MAYA_APP_DIR to the tests in usdMaya/CMakeLists.txt and pxrUsd/CMakeLists.txt instead, just like we do for MAYA_DISABLE_CIP? It's more boilerplate (which we can maybe move to a macro or something later) but it makes it less mysterious what environment is set when the tests are run. I guess the one tricky bit is that in testWrapper.py, you can set MAYA_APP_DIR to the temporary test directory, which you can't really do in the CMakeLists.txt. However, would it work to set MAYA_APP_DIR to a relative path, like "./maya_profile" instead? |
7187804
to
f75077e
Compare
Makes sense - moved it into the CMakeLists.txt files. I checked and confirmed that maya will use relative paths for MAYA_APP_DIR. Latest commit should have these changes! |
Just wanted to provide an update: I tried merging these changes earlier but the Maya tests on MacOS and Windows with Maya 2017 failed with the following errors: On MacOS: On Windows: On Linux, everything worked as expected. Running the test using an absolute path for MAYA_APP_DIR seemed to work in all cases, so it seems like support for relative paths is inconsistent at best. I wonder if another possible solution is to have testWrapper.py do some kind of substitution; for example, if it gets passed a parameter like $TESTDIR/maya_profile, it'll substitute $TESTDIR with the temporary test directory. Still thinking about this one, though. |
f75077e
to
b92a4d5
Compare
So, I fixed it along the lines you suggested - I altered testWrapper.py to automatically replace |
set $MAYA_APP_DIR before running tests, to use a default maya profile
Description of Change(s)
in testWrapper.py, set the $MAYA_APP_DIR env var, so that maya tests run using a default user profile
Included Commit(s)
7187804Fixes Issue(s)