Skip to content

Commit bdb864a

Browse files
committed
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
1 parent 2351d61 commit bdb864a

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lldb/unittests/Editline/EditlineTest.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -244,19 +244,17 @@ class EditlineTestFixture : public ::testing::Test {
244244
EditlineAdapter _el_adapter;
245245
std::shared_ptr<std::thread> _sp_output_thread;
246246

247-
protected:
248-
bool _has_term = true;
249-
250247
public:
251248
void SetUp() {
252249
FileSystem::Initialize();
253250

254251
// We need a TERM set properly for editline to work as expected.
255-
if (setenv("TERM", "vt100", 1) != 0)
256-
_has_term = false;
252+
setenv("TERM", "vt100", 1);
257253

258254
// Validate the editline adapter.
259255
EXPECT_TRUE(_el_adapter.IsValid());
256+
if (!_el_adapter.IsValid())
257+
return;
260258

261259
// Dump output.
262260
_sp_output_thread =
@@ -275,10 +273,6 @@ class EditlineTestFixture : public ::testing::Test {
275273
};
276274

277275
TEST_F(EditlineTestFixture, EditlineReceivesSingleLineText) {
278-
// Skip if we don't have a TERM.
279-
if (!_has_term)
280-
return;
281-
282276
// Send it some text via our virtual keyboard.
283277
const std::string input_text("Hello, world");
284278
EXPECT_TRUE(GetEditlineAdapter().SendLine(input_text));
@@ -295,10 +289,6 @@ TEST_F(EditlineTestFixture, EditlineReceivesSingleLineText) {
295289
}
296290

297291
TEST_F(EditlineTestFixture, EditlineReceivesMultiLineText) {
298-
// Skip if we don't have a TERM.
299-
if (!_has_term)
300-
return;
301-
302292
// Send it some text via our virtual keyboard.
303293
std::vector<std::string> input_lines;
304294
input_lines.push_back("int foo()");

0 commit comments

Comments
 (0)