teak-llvm/lldb/packages/Python/lldbsuite/test
Lawrence D'Anna b3faa01ff9 IOHandler: fall back on File::Read if a FILE* isn't available.
Summary:
IOHandler needs to read lines of input from a lldb::File.
The way it currently does this using, FILE*, which is something
we want to avoid now.   I'd prefer to just replace the FILE* code
with calls to File::Read, but it contains an awkward and
delicate workaround specific to ctrl-C handling on windows, and
it's not clear if or how that workaround would translate to
lldb::File.

So in this patch, we use use the FILE* if it's available, and only
fall back on File::Read if that's the only option.

I think this is a reasonable approach here for two reasons.  First
is that interactive terminal support is the one area where FILE*
can't be avoided.   We need them for libedit and curses anyway,
and using them here as well is consistent with that pattern.

The second reason is that the comments express a hope that the
underlying windows bug that's being worked around will be fixed one
day, so hopefully when that happens, that whole path can be deleted.

Reviewers: JDevlieghere, jasonmolenda, labath, lanza

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68622

llvm-svn: 374576
2019-10-11 17:43:32 +00:00
..
android/platform [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
api [lldb] [testsuite] Mark TestSBCommandReturnObject as failing on Windows 2019-10-04 20:49:44 +00:00
arm Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
benchmarks [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
commands [lldb] Mark import-std-module/empty-module as libc++ test 2019-10-11 17:34:44 +00:00
driver/batch_mode Don't stop execution in batch mode when process stops with SIGINT or SIGSTOP 2019-09-26 10:57:11 +00:00
functionalities TestMTCSimple: Make Makefile portable. 2019-10-10 21:21:16 +00:00
iohandler/completion dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
issue_verification [dotest] Delete trivial inline test makefiles 2019-09-05 06:55:23 +00:00
lang Speed up accelerator table lookups 2019-10-10 17:59:15 +00:00
linux Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
macosx [Make] Remove spurious line break 2019-10-10 21:49:25 +00:00
make Remove CC autodetection from Makefile.rules 2019-10-10 17:59:18 +00:00
plugins [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
python_api IOHandler: fall back on File::Read if a FILE* isn't available. 2019-10-11 17:43:32 +00:00
sample_test Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
sanity [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
source-manager [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
terminal [dotest] Centralize initialization commands even more 2019-09-05 07:35:45 +00:00
test_runner [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
tools Skip Apple simulator test for all remote testing scenarios. 2019-10-09 20:39:04 +00:00
types [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
__init__.py
.categories
bench.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
concurrent_base.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
configuration.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
darwin_log.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
decorators.py [DWARF] Evaluate DW_OP_entry_value 2019-09-11 21:23:45 +00:00
dotest_args.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
dotest.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
lldb_pylint_helper.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldbbench.py
lldbdwarf.py Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
lldbinline.py [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
lldbpexpect.py Port TestBatchMode to PExpectTest class 2019-09-04 09:20:08 +00:00
lldbplatform.py [dotest] Remove dead code 2019-07-26 01:58:18 +00:00
lldbplatformutil.py TestMTCSimple.py: allow the test to run on Darwin embedded platforms 2019-10-09 23:52:31 +00:00
lldbtest_config.py [dotest] Add the ability to set environment variables for the inferior. 2019-06-26 16:12:08 +00:00
lldbtest.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
lldbutil.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
lock.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
README-TestSuite Reflow readme 2018-12-17 21:18:12 +00:00
redo.py
test_categories.py [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
test_result.py [dotest] Remove -q (quiet) flag. 2019-08-28 16:28:58 +00:00