This revision was automatically updated to reflect the committed changes.
Closed by commit rL316244: lldb-server tests: Propagate environment variables
(pr34192) (authored by labath).
Repository:
rL LLVM
https://reviews.llvm.org/D39010
Files:
lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
Index: lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
===================================================================
--- lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
+++ lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
@@ -101,6 +101,14 @@
}
bool TestClient::SetInferior(llvm::ArrayRef<std::string> inferior_args) {
+ StringList env;
+ Host::GetEnvironment(env);
+ for (size_t i = 0; i < env.GetSize(); ++i) {
+ if (SendEnvironmentPacket(env[i].c_str()) != 0) {
+ GTEST_LOG_(ERROR) << "failed to set environment variable `" << env[i] <<
"`";
+ return false;
+ }
+ }
std::stringstream command;
command << "A";
for (size_t i = 0; i < inferior_args.size(); i++) {
Index: lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
===================================================================
--- lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
+++ lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
@@ -101,6 +101,14 @@
}
bool TestClient::SetInferior(llvm::ArrayRef<std::string> inferior_args) {
+ StringList env;
+ Host::GetEnvironment(env);
+ for (size_t i = 0; i < env.GetSize(); ++i) {
+ if (SendEnvironmentPacket(env[i].c_str()) != 0) {
+ GTEST_LOG_(ERROR) << "failed to set environment variable `" << env[i] << "`";
+ return false;
+ }
+ }
std::stringstream command;
command << "A";
for (size_t i = 0; i < inferior_args.size(); i++) {
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits