diff options
author | Davide Italiano <davide@freebsd.org> | 2019-04-23 16:51:20 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2019-04-23 16:51:20 +0000 |
commit | bdb864a5762e10a485c0b76c5677f5c14b4045d7 (patch) | |
tree | 3555ab41384f82e180d42f429af3f512fbaf93c5 /lldb/unittests/Editline/EditlineTest.cpp | |
parent | 2351d6102f302a0032a4f4ce82bc2b84b4717edb (diff) | |
download | bcm5719-llvm-bdb864a5762e10a485c0b76c5677f5c14b4045d7.tar.gz bcm5719-llvm-bdb864a5762e10a485c0b76c5677f5c14b4045d7.zip |
Revert "[EditLineTest] Not always TERM is available, e.g. on some bots."
This was a speculative fix trying to placate some bots, but it's
ultimately just a bot configuration problem and not a code problem.
llvm-svn: 359011
Diffstat (limited to 'lldb/unittests/Editline/EditlineTest.cpp')
-rw-r--r-- | lldb/unittests/Editline/EditlineTest.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lldb/unittests/Editline/EditlineTest.cpp b/lldb/unittests/Editline/EditlineTest.cpp index 2bfd1e7848e..1a4bd37e767 100644 --- a/lldb/unittests/Editline/EditlineTest.cpp +++ b/lldb/unittests/Editline/EditlineTest.cpp @@ -244,19 +244,17 @@ private: EditlineAdapter _el_adapter; std::shared_ptr<std::thread> _sp_output_thread; -protected: - bool _has_term = true; - public: void SetUp() { FileSystem::Initialize(); // We need a TERM set properly for editline to work as expected. - if (setenv("TERM", "vt100", 1) != 0) - _has_term = false; + setenv("TERM", "vt100", 1); // Validate the editline adapter. EXPECT_TRUE(_el_adapter.IsValid()); + if (!_el_adapter.IsValid()) + return; // Dump output. _sp_output_thread = @@ -275,10 +273,6 @@ public: }; TEST_F(EditlineTestFixture, EditlineReceivesSingleLineText) { - // Skip if we don't have a TERM. - if (!_has_term) - return; - // Send it some text via our virtual keyboard. const std::string input_text("Hello, world"); EXPECT_TRUE(GetEditlineAdapter().SendLine(input_text)); @@ -295,10 +289,6 @@ TEST_F(EditlineTestFixture, EditlineReceivesSingleLineText) { } TEST_F(EditlineTestFixture, EditlineReceivesMultiLineText) { - // Skip if we don't have a TERM. - if (!_has_term) - return; - // Send it some text via our virtual keyboard. std::vector<std::string> input_lines; input_lines.push_back("int foo()"); |