diff options
author | Matthew Blecker <matthewb@chromium.org> | 2018-10-12 12:19:01 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-15 23:28:47 -0700 |
commit | 35720d34cb1b853dce0f04e2909e2c7d92f324bc (patch) | |
tree | d57b74444cc9123b259695ccdf47606a8ed2a58d /util/ec3po/console_unittest.py | |
parent | cb8555bcb6fc681f646e68c4baa8d3950ffbeaf2 (diff) | |
download | chrome-ec-35720d34cb1b853dce0f04e2909e2c7d92f324bc.tar.gz |
ec3po: Update platform/ec/ side of ec3po to use threadproc_shim.py.
This removes direct use of multiprocessing module from the platform/ec/
side of ec3po. Once the third_party/hdctools/ side has been updated to use
threadproc_shim.py as well, that library can be updated with
threading-oriented implementations.
BRANCH=none
BUG=b:79684405
TEST=With a servo_micro connected to an octopus_ite, functionality
involving the EC console continues to work. I tested dut-control
ec_uart_pty (including using the UART with minicom), dut_i2c_mux,
enable_ite_dfu, get_ite_chipid commands.
Change-Id: I68eb2d8cd1d927d63b12696938169281e51de6fc
Signed-off-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1279153
Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Diffstat (limited to 'util/ec3po/console_unittest.py')
-rwxr-xr-x | util/ec3po/console_unittest.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/util/ec3po/console_unittest.py b/util/ec3po/console_unittest.py index 1e9dae9efd..22d468263b 100755 --- a/util/ec3po/console_unittest.py +++ b/util/ec3po/console_unittest.py @@ -11,12 +11,12 @@ import binascii # pylint: disable=cros-logging-import import logging import mock -import multiprocessing import tempfile import unittest import console import interpreter +import threadproc_shim ESC_STRING = chr(console.ControlKey.ESC) @@ -238,7 +238,7 @@ class TestConsoleEditingMethods(unittest.TestCase): # Create some dummy pipes. These won't be used since we'll mock out sends # to the interpreter. - dummy_pipe_end_0, dummy_pipe_end_1 = multiprocessing.Pipe() + dummy_pipe_end_0, dummy_pipe_end_1 = threadproc_shim.Pipe() self.console = console.Console(self.tempfile.fileno(), self.tempfile, tempfile.TemporaryFile(), dummy_pipe_end_0, dummy_pipe_end_1) @@ -250,9 +250,6 @@ class TestConsoleEditingMethods(unittest.TestCase): self.console.enhanced_ec = True self.console.CheckForEnhancedECImage = mock.MagicMock(return_value=True) - # Mock out sends to the interpreter. - multiprocessing.Pipe.send = mock.MagicMock() - def test_EnteringChars(self): """Verify that characters are echoed onto the console.""" test_str = 'abc' |