Issue 1319 - make unit test paths more configurable

This commit is contained in:
Thomas Nagy 2014-09-21 10:58:52 +02:00
parent cb030505af
commit 69c1fb1fec
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 7 additions and 7 deletions

View File

@ -77,6 +77,9 @@ class utest(Task.Task):
return Task.RUN_ME
return ret
def add_path(self, dct, path, var):
dct[var] = os.pathsep.join(Utils.to_list(path) + [os.environ.get(var, '')])
def run(self):
"""
Execute the test. The execution is always successful, and the results
@ -104,16 +107,13 @@ class utest(Task.Task):
if s not in lst:
lst.append(s)
def add_path(dct, path, var):
dct[var] = os.pathsep.join(Utils.to_list(path) + [os.environ.get(var, '')])
if Utils.is_win32:
add_path(fu, lst, 'PATH')
self.add_path(fu, lst, 'PATH')
elif Utils.unversioned_sys_platform() == 'darwin':
add_path(fu, lst, 'DYLD_LIBRARY_PATH')
add_path(fu, lst, 'LD_LIBRARY_PATH')
self.add_path(fu, lst, 'DYLD_LIBRARY_PATH')
self.add_path(fu, lst, 'LD_LIBRARY_PATH')
else:
add_path(fu, lst, 'LD_LIBRARY_PATH')
self.add_path(fu, lst, 'LD_LIBRARY_PATH')
self.generator.bld.all_test_paths = fu