Author: davide Date: Tue Apr 23 09:51:20 2019 New Revision: 359011 URL: http://llvm.org/viewvc/llvm-project?rev=359011&view=rev Log: 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. Modified: lldb/trunk/unittests/Editline/EditlineTest.cpp Modified: lldb/trunk/unittests/Editline/EditlineTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Editline/EditlineTest.cpp?rev=359011&r1=359010&r2=359011&view=diff ============================================================================== --- lldb/trunk/unittests/Editline/EditlineTest.cpp (original) +++ lldb/trunk/unittests/Editline/EditlineTest.cpp Tue Apr 23 09:51:20 2019 @@ -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, EditlineRece } 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()"); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits