This infrastructure has proven proven its worth, so give it a more prominent place. My immediate motivation for this is the desire to reuse this infrastructure for qemu platform testing, but I believe this move makes sense independently of that. Moving this code to the packages tree will allow as to add more structure to the gdb client tests -- currently they are all crammed into the same test folder as that was the only way they could access this code. I'm splitting the code into two parts while moving it. The first once contains just the generic gdb protocol wrappers, while the other one contains the unit test glue. The reason for that is that for qemu testing, I need to run the gdb code in a separate process, so I will only be using the first part there. Differential Revision: https://reviews.llvm.org/D113893
25 lines
981 B
Python
25 lines
981 B
Python
from lldbsuite.test.gdbclientutils import *
|
|
from lldbsuite.test.lldbgdbclient import GDBPlatformClientTestBase
|
|
|
|
class TestGDBRemoteDiskFileCompletion(GDBPlatformClientTestBase):
|
|
|
|
mydir = GDBPlatformClientTestBase.compute_mydir(__file__)
|
|
|
|
def test_autocomplete_request(self):
|
|
"""Test remote disk completion on remote-gdb-server plugin"""
|
|
|
|
class Responder(MockGDBServerResponder):
|
|
def qPathComplete(self):
|
|
return "M{},{}".format(
|
|
"test".encode().hex(),
|
|
"123".encode().hex()
|
|
)
|
|
|
|
self.server.responder = Responder()
|
|
|
|
self.complete_from_to('platform get-size ', ['test', '123'])
|
|
self.complete_from_to('platform get-file ', ['test', '123'])
|
|
self.complete_from_to('platform put-file foo ', ['test', '123'])
|
|
self.complete_from_to('platform file open ', ['test', '123'])
|
|
self.complete_from_to('platform settings -w ', ['test', '123'])
|