Commit 1bc7ccd1 authored by Nicolas Delaby's avatar Nicolas Delaby

Deal with Shebang size limitation

parent d8be73f8
...@@ -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)
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