Commit e592b869 authored by Ben Cooksley's avatar Ben Cooksley

Implement support for customising some of the arguments we pass to CTest when executing it.

parent dcdf3d11
......@@ -58,6 +58,10 @@ Devel:
# Defaults to True
launch-dbus-session: True
# ctest-arguments: Additional arguments which should be passed to CTest when invoking it.
# This can be used to customise the behaviour of CTest in executing tests for a project.
ctest-arguments: ''
# run-cppcheck: Governs whether the code quality tool Cppcheck is run over the source code
# Cppcheck validation will only be done on Linux, regardless of the value specified here
# Defaults to True
......@@ -63,6 +63,7 @@ class Loader(object):
'per-test-timeout': 600,
'setup-x-environment': True,
'launch-dbus-session': True,
'ctest-arguments': '',
'run-cppcheck': True,
'cppcheck-arguments': '',
'extract-lcov-results': True,
......@@ -94,8 +94,8 @@ except OSError:
time.sleep( 5 )
# Now it's time to invoke CTest! Build up the command...
commandToRun = "ctest -T Test --output-on-failure --no-compress-output --timeout {timeLimit}"
commandToRun = commandToRun.format( timeLimit=buildSpecification['per-test-timeout'] )
commandToRun = "ctest -T Test --output-on-failure --no-compress-output --timeout {timeLimit} {additionalCTestArguments}"
commandToRun = commandToRun.format( timeLimit=buildSpecification['per-test-timeout'], additionalCTestArguments=buildSpecification['ctest-arguments'] )
# And run it!
ctestProcess = subprocess.Popen( commandToRun, stdout=sys.stdout, stderr=sys.stderr, shell=True, cwd=buildLocation, env=buildEnvironment )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment