2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-24 10:49:42 +01:00

Removed ut_fun from waf_unit_test.py

This commit is contained in:
Thomas Nagy 2016-11-20 10:21:19 +01:00
parent cdfd5f03cf
commit 9c87928f33
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
3 changed files with 2 additions and 11 deletions

2
TODO
View File

@ -10,5 +10,5 @@ Merge mem_reducer.py in the mainline
Keep sorted lists in TaskGen.prec[]
Improve the sorting in TaskGen.post()
Default to force files into the build directory
Remove ut_exec, ut_fun, ut_cmd from waf_unit_test.py
Remove ut_exec, ut_cmd from waf_unit_test.py

View File

@ -1,18 +1,11 @@
#! /usr/bin/env python
# encoding: utf-8
def fun(task):
pass
# print task.generator.bld.name_to_obj('somelib').link_task.outputs[0].abspath(task.env)
# task.ut_exec.append('--help')
bld.program(
features = 'test',
source = 'AccumulatorTest.cpp',
target = 'unit_test_program',
use = 'unittestmain useless GTEST',
ut_cwd = bld.path.abspath(),
ut_fun = fun
)

View File

@ -152,10 +152,8 @@ class utest(Task.Task):
if hasattr(self.generator, 'ut_run'):
return self.generator.ut_run(self)
# TODO ut_exec, ut_fun, ut_cmd should be considered obsolete
# TODO ut_exec, ut_cmd should be considered obsolete
self.ut_exec = getattr(self.generator, 'ut_exec', [self.inputs[0].abspath()])
if getattr(self.generator, 'ut_fun', None):
self.generator.ut_fun(self)
testcmd = getattr(self.generator, 'ut_cmd', False) or getattr(Options.options, 'testcmd', False)
if testcmd:
self.ut_exec = (testcmd % ' '.join(self.ut_exec)).split(' ')