Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-01-24 12:25:52 +00:00
parent 55930dc4fe
commit b2c212c239
24 changed files with 204 additions and 355 deletions

21
wscript
View File

@@ -415,6 +415,15 @@ def build(bld):
if not Options.options.compile_targets:
Options.options.compile_targets = os.path.basename(program_name)
if Options.options.regression or Options.options.regression_generate:
if not env['DIFF']:
raise Utils.WafError("Cannot run regression tests: the 'diff' program is not installed.")
regression_traces = env['REGRESSION_TRACES']
if not regression_traces:
raise Utils.WafError("Cannot run regression tests: reference traces directory not given"
" (--with-regression-traces configure option)")
regression.run_regression(bld, regression_traces)
def get_command_template(*arguments):
@@ -435,18 +444,6 @@ def shutdown():
if Options.commands['check']:
_run_waf_check()
if Options.options.regression or Options.options.regression_generate:
if not env['DIFF']:
raise Utils.WafError("Cannot run regression tests: the 'diff' program is not installed.")
regression_traces = env['REGRESSION_TRACES']
if not regression_traces:
raise Utils.WafError("Cannot run regression tests: reference traces directory not given"
" (--with-regression-traces configure option)")
retval = regression.run_regression(regression_traces)
if retval:
sys.exit(retval)
if Options.options.lcov_report:
lcov_report()