mirror of https://gitlab.com/ita1024/waf.git
Issue 1319 Reduce the amount of paths for the unit test execution
This commit is contained in:
parent
c4685a8cb8
commit
760d0f875c
|
@ -11,6 +11,7 @@ NEW IN WAF 1.7.11
|
||||||
* Share moc tasks in the Qt processing #1318
|
* Share moc tasks in the Qt processing #1318
|
||||||
* Fixed a source of unnecessary rebuilds in the Qt processing
|
* Fixed a source of unnecessary rebuilds in the Qt processing
|
||||||
* Use LIB/INCLUDE environment variables in boost library detection on windows #1310
|
* Use LIB/INCLUDE environment variables in boost library detection on windows #1310
|
||||||
|
* Reduce the amount of paths in the unit test execution #1319
|
||||||
|
|
||||||
NEW IN WAF 1.7.10
|
NEW IN WAF 1.7.10
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
# Richard Quirk, 2008
|
# Richard Quirk, 2008
|
||||||
|
|
||||||
"""
|
"""
|
||||||
execute tests during the build
|
Execute tests during the build - requires cppunit
|
||||||
requires cppunit
|
|
||||||
|
To force all tests, run with "waf build --alltests"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from waflib.Tools import waf_unit_test
|
from waflib.Tools import waf_unit_test
|
||||||
|
|
|
@ -75,18 +75,22 @@ class utest(Task.Task):
|
||||||
filename = self.inputs[0].abspath()
|
filename = self.inputs[0].abspath()
|
||||||
self.ut_exec = getattr(self.generator, 'ut_exec', [filename])
|
self.ut_exec = getattr(self.generator, 'ut_exec', [filename])
|
||||||
if getattr(self.generator, 'ut_fun', None):
|
if getattr(self.generator, 'ut_fun', None):
|
||||||
|
# FIXME waf 1.8 - add a return statement here?
|
||||||
self.generator.ut_fun(self)
|
self.generator.ut_fun(self)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fu = getattr(self.generator.bld, 'all_test_paths')
|
fu = getattr(self.generator.bld, 'all_test_paths')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
# this operation may be performed by at most #maxjobs
|
||||||
fu = os.environ.copy()
|
fu = os.environ.copy()
|
||||||
|
|
||||||
lst = []
|
lst = []
|
||||||
for g in self.generator.bld.groups:
|
for g in self.generator.bld.groups:
|
||||||
for tg in g:
|
for tg in g:
|
||||||
if getattr(tg, 'link_task', None):
|
if getattr(tg, 'link_task', None):
|
||||||
lst.append(tg.link_task.outputs[0].parent.abspath())
|
s = tg.link_task.outputs[0].parent.abspath()
|
||||||
|
if s not in lst:
|
||||||
|
lst.append(s)
|
||||||
|
|
||||||
def add_path(dct, path, var):
|
def add_path(dct, path, var):
|
||||||
dct[var] = os.pathsep.join(Utils.to_list(path) + [os.environ.get(var, '')])
|
dct[var] = os.pathsep.join(Utils.to_list(path) + [os.environ.get(var, '')])
|
||||||
|
|
Loading…
Reference in New Issue