Commit 2513623c authored by Ben Cooksley's avatar Ben Cooksley

Make sure KWin tests wait for load to settle

Fixes T10069
parent a7949311
......@@ -162,6 +162,19 @@ except OSError:
# As some of the above might still be getting themselves ready, wait for a few moments...
time.sleep( 5 )
# KWin specific
# Running tests for KWin while load is high on the system pretty much always results in tests failing
# We therefore check the system load before continuing to the actual test execution
while arguments.project == 'kwin' and sys.platform != 'win32' and sys.platform != 'darwin':
# Grab the current system load
load1, load5, load15 = os.getloadavg()
# Check to see if it's low enough for us
if load1 < 1 and load5 < 1:
break
# Otherwise sleep for a few seconds and try again
time.sleep( 5 )
# Now it's time to invoke CTest! Build up the command...
commandToRun = "ctest -T Test --output-on-failure --no-compress-output --test-output-size-passed 1048576 --test-output-size-failed 1048576 --timeout {timeLimit} {additionalCTestArguments}"
commandToRun = commandToRun.format( timeLimit=buildSpecification['per-test-timeout'], additionalCTestArguments=buildSpecification['ctest-arguments'] )
......
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