-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[windows] fix missing environment variables when running check-lldb #82063
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
base: main
Are you sure you want to change the base?
[windows] fix missing environment variables when running check-lldb #82063
Conversation
@swift-ci please test |
This makes sense. I think passing Not only does that avoid diverging the platforms and swift repo, it also has the benefit of being a bit more "hermetical" if the test python is different. I'm not sure if this is even possible here, but |
I opened llvm/llvm-project#143183 with the changes to the lldb lit config. We still need the |
I think that is best handled outside of lit - this location is something specific to the build setup. It is possible to place the extracted python anywhere. If we want to do this through lit, it should be wired through CMake and through CMake into lit. |
…3183) When testing LLDB, we want to make sure to use the same Python as the one we used to build it. This patch used the CMake variable `Python3_ROOT_DIR` to set the `PYTHONHOME` env variable in LLDB lit tests, in order to ensure of this. Please see swiftlang/swift#82063 for the original issue.
…esting (#143183) When testing LLDB, we want to make sure to use the same Python as the one we used to build it. This patch used the CMake variable `Python3_ROOT_DIR` to set the `PYTHONHOME` env variable in LLDB lit tests, in order to ensure of this. Please see swiftlang/swift#82063 for the original issue.
Co-authored-by: Saleem Abdulrasool <[email protected]>
…m#143183) When testing LLDB, we want to make sure to use the same Python as the one we used to build it. This patch used the CMake variable `Python3_ROOT_DIR` to set the `PYTHONHOME` env variable in LLDB lit tests, in order to ensure of this. Please see swiftlang/swift#82063 for the original issue.
What I have in mind is to do something like this: # lit.cfg.py
config.environment["PATH"] = os.path.pathsep.join(config.python_root_dir, config.environment.get("PATH", "")) And What do you think? |
Currently when running
build.ps1
at desk to build and test LLDB, the tests will fail becausepython39.dll
is not in the Path and becausePYTHONHOME
is not set.This PR adds
python39.dll
to thePath
before running the tests and passesPYTHONHOME
tolit
throughLLDB_TEST_USER_ARGS
. Simply setting thePYTHONHOME
env variable is not enough aslit
reset the env before running the tests.