From 88c643b6fec27eec436c8d138fee6346e92337d6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 20 Aug 2019 18:01:57 +0000 Subject: Remove upstream files and directories from vendor/lldb/dist that we do not use. This saves on repository space, and reduces the number of tree conflicts when merging. --- unittests/tools/lldb-server/tests/LLGSTest.cpp | 70 -------------------------- 1 file changed, 70 deletions(-) delete mode 100644 unittests/tools/lldb-server/tests/LLGSTest.cpp (limited to 'unittests/tools/lldb-server/tests/LLGSTest.cpp') diff --git a/unittests/tools/lldb-server/tests/LLGSTest.cpp b/unittests/tools/lldb-server/tests/LLGSTest.cpp deleted file mode 100644 index fab84f7dd6b5..000000000000 --- a/unittests/tools/lldb-server/tests/LLGSTest.cpp +++ /dev/null @@ -1,70 +0,0 @@ -//===-- LLGSTest.cpp --------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "TestBase.h" -#include "lldb/Host/Host.h" -#include "llvm/Testing/Support/Error.h" - -using namespace llgs_tests; -using namespace lldb_private; -using namespace llvm; - -TEST_F(TestBase, LaunchModePreservesEnvironment) { - putenv(const_cast("LLDB_TEST_MAGIC_VARIABLE=LLDB_TEST_MAGIC_VALUE")); - - auto ClientOr = TestClient::launch(getLogFileName(), - {getInferiorPath("environment_check")}); - ASSERT_THAT_EXPECTED(ClientOr, Succeeded()); - auto &Client = **ClientOr; - - ASSERT_THAT_ERROR(Client.ContinueAll(), Succeeded()); - ASSERT_THAT_EXPECTED( - Client.GetLatestStopReplyAs(), - HasValue(testing::Property(&StopReply::getKind, - WaitStatus{WaitStatus::Exit, 0}))); -} - -TEST_F(TestBase, DS_TEST(DebugserverEnv)) { - // Test that --env takes precedence over inherited environment variables. - putenv(const_cast("LLDB_TEST_MAGIC_VARIABLE=foobar")); - - auto ClientOr = TestClient::launchCustom(getLogFileName(), - { "--env", "LLDB_TEST_MAGIC_VARIABLE=LLDB_TEST_MAGIC_VALUE" }, - {getInferiorPath("environment_check")}); - ASSERT_THAT_EXPECTED(ClientOr, Succeeded()); - auto &Client = **ClientOr; - - ASSERT_THAT_ERROR(Client.ContinueAll(), Succeeded()); - ASSERT_THAT_EXPECTED( - Client.GetLatestStopReplyAs(), - HasValue(testing::Property(&StopReply::getKind, - WaitStatus{WaitStatus::Exit, 0}))); -} - -TEST_F(TestBase, LLGS_TEST(vAttachRichError)) { - auto ClientOr = TestClient::launch(getLogFileName(), - {getInferiorPath("environment_check")}); - ASSERT_THAT_EXPECTED(ClientOr, Succeeded()); - auto &Client = **ClientOr; - - // Until we enable error strings we should just get the error code. - ASSERT_THAT_ERROR(Client.SendMessage("vAttach;1"), - Failed(testing::Property( - &ErrorInfoBase::message, "Error 255"))); - - ASSERT_THAT_ERROR(Client.SendMessage("QEnableErrorStrings"), Succeeded()); - - // Now, we expect the full error message. - ASSERT_THAT_ERROR( - Client.SendMessage("vAttach;1"), - Failed(testing::Property( - &ErrorInfoBase::message, - testing::StartsWith( - "cannot attach to process 1 when another process with pid")))); -} -- cgit v1.2.3