Page MenuHomePhabricator

[dotest] Add the ability to set environment variables for the inferior.
ClosedPublic

Authored by JDevlieghere on Tue, Jun 25, 1:48 PM.

Details

Summary

This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Tue, Jun 25, 1:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Jun 25, 1:48 PM
amccarth added inline comments.
lldb/packages/Python/lldbsuite/test/lldbtest.py
1861 ↗(On Diff #206523)

env or settings set target.env-vars? On Windows, where spaces in paths are common, this works:

(lldb) settings set target.env-vars "MY_PATH=C:\Program Files\stuff"

but this doesn't:

(lldb) env "MY_PATH=C:\Program Files\stuff"
JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.
lldb/packages/Python/lldbsuite/test/lldbtest.py
1861 ↗(On Diff #206523)

I've updated the diff, but this sounds more like a bug in the alias?

The LGTM, but I wasn't nominated as a reviewer, and I was mostly looking at it from the point of Windows compatibility.

davide accepted this revision.Wed, Jun 26, 9:10 AM
This revision is now accepted and ready to land.Wed, Jun 26, 9:10 AM
This revision was automatically updated to reflect the committed changes.
JDevlieghere marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptWed, Jun 26, 9:12 AM