From 9c87928f3379f4cd2543666f0ba043a57730927f Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 20 Nov 2016 10:21:19 +0100 Subject: [PATCH] Removed ut_fun from waf_unit_test.py --- TODO | 2 +- playground/gtest/tests/test1/wscript_build | 7 ------- waflib/Tools/waf_unit_test.py | 4 +--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index 5879dba3..a5ddff6f 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/playground/gtest/tests/test1/wscript_build b/playground/gtest/tests/test1/wscript_build index c969fbab..2af2f063 100644 --- a/playground/gtest/tests/test1/wscript_build +++ b/playground/gtest/tests/test1/wscript_build @@ -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 ) diff --git a/waflib/Tools/waf_unit_test.py b/waflib/Tools/waf_unit_test.py index db8d3ba5..88985c57 100644 --- a/waflib/Tools/waf_unit_test.py +++ b/waflib/Tools/waf_unit_test.py @@ -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(' ')