Commit cc69648e authored by Łukasz Nowak's avatar Łukasz Nowak
parent 5d0dfed4
...@@ -8,4 +8,16 @@ def runTestSuite(args): ...@@ -8,4 +8,16 @@ def runTestSuite(args):
env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':'))
env['INSTANCE_HOME'] = d['instance_home'] env['INSTANCE_HOME'] = d['instance_home']
env['REAL_INSTANCE_HOME'] = d['instance_home'] env['REAL_INSTANCE_HOME'] = d['instance_home']
os.execve(d['call_list'][0], d['call_list'] + sys.argv[1:], env) # Deal with Shebang size limitation
executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r')
line = file_object.readline()
file_object.close()
argument_list = []
if line[:2] == '#!':
executable_filepath = line[2:].strip()
argument_list.append(executable_filepath)
argument_list.extend(d['call_list'])
argument_list.extend(sys.argv[1:])
argument_list.append(env)
os.execle(executable_filepath, *argument_list)
...@@ -8,4 +8,16 @@ def runUnitTest(args): ...@@ -8,4 +8,16 @@ def runUnitTest(args):
env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':')) env['PATH'] = ':'.join([d['prepend_path']] + os.environ['PATH'].split(':'))
env['INSTANCE_HOME'] = d['instance_home'] env['INSTANCE_HOME'] = d['instance_home']
env['REAL_INSTANCE_HOME'] = d['instance_home'] env['REAL_INSTANCE_HOME'] = d['instance_home']
os.execve(d['call_list'][0], d['call_list'] + sys.argv[1:], env) # Deal with Shebang size limitation
executable_filepath = d['call_list'][0]
file_object = open(executable_filepath, 'r')
line = file_object.readline()
file_object.close()
argument_list = []
if line[:2] == '#!':
executable_filepath = line[2:].strip()
argument_list.append(executable_filepath)
argument_list.extend(d['call_list'])
argument_list.extend(sys.argv[1:])
argument_list.append(env)
os.execle(executable_filepath, *argument_list)
...@@ -198,12 +198,19 @@ repository = %(repository_path)s ...@@ -198,12 +198,19 @@ repository = %(repository_path)s
run_test_suite_revision = revision run_test_suite_revision = revision
if isinstance(revision, tuple): if isinstance(revision, tuple):
revision = ','.join(revision) revision = ','.join(revision)
run_test_suite = subprocess.Popen([run_test_suite_path, # Deal with Shebang size limitation
'--test_suite', config['test_suite_name'], file_object = open(run_test_suite_path, 'r')
'--revision', revision, line = file_object.readline()
'--node_quantity', config['node_quantity'], file_object.close()
'--master_url', config['test_suite_master_url'], invocation_list = []
], ) if line[:2] == '#!':
invocation_list = line[2:].split()
invocation_list.extend([run_test_suite_path,
'--test_suite', config['test_suite_name'],
'--revision', revision,
'--node_quantity', config['node_quantity'],
'--master_url', config['test_suite_master_url']])
run_test_suite = subprocess.Popen(invocation_list)
process_group_pid_set.add(run_test_suite.pid) process_group_pid_set.add(run_test_suite.pid)
run_test_suite.wait() run_test_suite.wait()
process_group_pid_set.remove(run_test_suite.pid) process_group_pid_set.remove(run_test_suite.pid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment