summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/settings/main.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
commit29872606d220420d53fde7cc5e3bea15f8da62e7 (patch)
tree47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/settings/main.cpp
parentadfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff)
downloadbcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.tar.gz
bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.zip
[lldb] Restructure test folders to match LLDB command hierarchy
Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/settings/main.cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/settings/main.cpp74
1 files changed, 0 insertions, 74 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/settings/main.cpp b/lldb/packages/Python/lldbsuite/test/settings/main.cpp
deleted file mode 100644
index 5159eaa65b5..00000000000
--- a/lldb/packages/Python/lldbsuite/test/settings/main.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdlib>
-#include <string>
-#include <fstream>
-#include <iostream>
-
-int numberfn()
-{
- return 0x5a;
-}
-
-int
-main(int argc, char const *argv[])
-{
- // The program writes its output to the following file:
- //
- // o "output1.txt" for test_pass_host_env_vars() test case
- // o "output2.txt" for test_run_args_and_env_vars_with_dsym() test case
- // o "output2.txt" for test_run_args_and_env_vars_with_dwarf() test case
- std::ofstream outfile;
- if (argc == 1)
- outfile.open("output1.txt");
- else
- outfile.open("output2.txt");
-
- for (unsigned i = 0; i < argc; ++i) {
- std::string theArg(argv[i]);
- if (i == 1 && "A" == theArg)
- outfile << "argv[1] matches\n";
-
- if (i == 2 && "B" == theArg)
- outfile << "argv[2] matches\n";
-
- if (i == 3 && "C" == theArg)
- outfile << "argv[3] matches\n";
- }
-
- // For passing environment vars from the debugger to the launched process.
- if (::getenv("MY_ENV_VAR")) {
- std::string MY_ENV_VAR(getenv("MY_ENV_VAR"));
- if ("YES" == MY_ENV_VAR) {
- outfile << "Environment variable 'MY_ENV_VAR' successfully passed.\n";
- }
- }
-
-
- // For passing host environment vars to the launched process.
- if (::getenv("MY_HOST_ENV_VAR1")) {
- std::string MY_HOST_ENV_VAR1(getenv("MY_HOST_ENV_VAR1"));
- if ("VAR1" == MY_HOST_ENV_VAR1) {
- outfile << "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.\n";
- }
- }
-
- if (::getenv("MY_HOST_ENV_VAR2")) {
- std::string MY_HOST_ENV_VAR2(getenv("MY_HOST_ENV_VAR2"));
- if ("VAR2" == MY_HOST_ENV_VAR2) {
- outfile << "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed.\n";
- }
- }
-
- std::cerr << "This message should go to standard error.\n";
- std::cout << "This message should go to standard out.\n";
-
- outfile.close();
- return numberfn();
-}
OpenPOWER on IntegriCloud