summaryrefslogtreecommitdiff
path: root/unittests/tools/lldb-server/inferior/environment_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/tools/lldb-server/inferior/environment_check.cpp')
-rw-r--r--unittests/tools/lldb-server/inferior/environment_check.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/unittests/tools/lldb-server/inferior/environment_check.cpp b/unittests/tools/lldb-server/inferior/environment_check.cpp
new file mode 100644
index 000000000000..d2a5ede0cabf
--- /dev/null
+++ b/unittests/tools/lldb-server/inferior/environment_check.cpp
@@ -0,0 +1,20 @@
+//===-- thread_inferior.cpp -------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string>
+#include <cstdlib>
+
+int main() {
+ const char *value = std::getenv("LLDB_TEST_MAGIC_VARIABLE");
+ if (!value)
+ return 1;
+ if (std::string(value) != "LLDB_TEST_MAGIC_VALUE")
+ return 2;
+ return 0;
+}