mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
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
|
||||
* Fixed a source of unnecessary rebuilds in the Qt processing
|
||||
* 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
|
||||
-----------------
|
||||
|
@ -3,8 +3,9 @@
|
||||
# Richard Quirk, 2008
|
||||
|
||||
"""
|
||||
execute tests during the build
|
||||
requires cppunit
|
||||
Execute tests during the build - requires cppunit
|
||||
|
||||
To force all tests, run with "waf build --alltests"
|
||||
"""
|
||||
|
||||
from waflib.Tools import waf_unit_test
|
||||
|
@ -75,18 +75,22 @@ class utest(Task.Task):
|
||||
filename = self.inputs[0].abspath()
|
||||
self.ut_exec = getattr(self.generator, 'ut_exec', [filename])
|
||||
if getattr(self.generator, 'ut_fun', None):
|
||||
# FIXME waf 1.8 - add a return statement here?
|
||||
self.generator.ut_fun(self)
|
||||
|
||||
try:
|
||||
fu = getattr(self.generator.bld, 'all_test_paths')
|
||||
except AttributeError:
|
||||
# this operation may be performed by at most #maxjobs
|
||||
fu = os.environ.copy()
|
||||
|
||||
lst = []
|
||||
for g in self.generator.bld.groups:
|
||||
for tg in g:
|
||||
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):
|
||||
dct[var] = os.pathsep.join(Utils.to_list(path) + [os.environ.get(var, '')])
|
||||
|
Loading…
Reference in New Issue
Block a user