diff options
author | Nobuaki Sukegawa <nsuke@apache.org> | 2016-01-08 03:26:44 +0900 |
---|---|---|
committer | Nobuaki Sukegawa <nsukeg@gmail.com> | 2016-01-11 11:41:56 +0900 |
commit | 85650612e15c79c79e470553d3779d18f755150c (patch) | |
tree | 68d04348423b32a4fd6458998594516bb311f79a /test/crossrunner | |
parent | a3b88a012e6452b665073b7fb9e211e86093efbf (diff) | |
download | thrift-85650612e15c79c79e470553d3779d18f755150c.tar.gz |
THRIFT-3531 Create cross lang feature test for string and container read length limit
This closes #780
Diffstat (limited to 'test/crossrunner')
-rw-r--r-- | test/crossrunner/collect.py | 1 | ||||
-rw-r--r-- | test/crossrunner/test.py | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/test/crossrunner/collect.py b/test/crossrunner/collect.py index 455189cbc..f92b9e2d7 100644 --- a/test/crossrunner/collect.py +++ b/test/crossrunner/collect.py @@ -44,6 +44,7 @@ VALID_JSON_KEYS = [ 'workdir', # work directory where command is executed 'command', # test command 'extra_args', # args appended to command after other args are appended + 'remote_args', # args added to the other side of the program 'join_args', # whether args should be passed as single concatenated string 'env', # additional environmental variable ] diff --git a/test/crossrunner/test.py b/test/crossrunner/test.py index 49ba7d3f0..bb81c4fe5 100644 --- a/test/crossrunner/test.py +++ b/test/crossrunner/test.py @@ -31,7 +31,7 @@ def domain_socket_path(port): class TestProgram(object): def __init__(self, kind, name, protocol, transport, socket, workdir, command, env=None, - extra_args=[], join_args=False, **kwargs): + extra_args=[], extra_args2=[], join_args=False, **kwargs): self.kind = kind self.name = name self.protocol = protocol @@ -46,6 +46,7 @@ class TestProgram(object): else: self.env = os.environ self._extra_args = extra_args + self._extra_args2 = extra_args2 self._join_args = join_args def _fix_cmd_path(self, cmd): @@ -69,7 +70,7 @@ class TestProgram(object): def build_command(self, port): cmd = copy.copy(self._base_command) - args = [] + args = self._extra_args2 args.append('--protocol=' + self.protocol) args.append('--transport=' + self.transport) socket_args = self._socket_args(self.socket, port) @@ -94,8 +95,12 @@ class TestEntry(object): self.protocol = kwargs['protocol'] self.transport = kwargs['transport'] self.socket = kwargs['socket'] - self.server = TestProgram('server', **self._fix_workdir(merge_dict(self._config, server))) - self.client = TestProgram('client', **self._fix_workdir(merge_dict(self._config, client))) + srv_dict = self._fix_workdir(merge_dict(self._config, server)) + cli_dict = self._fix_workdir(merge_dict(self._config, client)) + cli_dict['extra_args2'] = srv_dict.pop('remote_args', []) + srv_dict['extra_args2'] = cli_dict.pop('remote_args', []) + self.server = TestProgram('server', **srv_dict) + self.client = TestProgram('client', **cli_dict) self.delay = delay self.timeout = timeout self._name = None |