Android: Disable androidtestrunner extra timeout
We already have: a, a timeout as part of QtTest. By default it lets each test function run for 5 minutes. This timeout can be configured using QTEST_FUNCTION_TIMEOUT. b, maxTimeBetweenOutput in the CI. The CI will kill the process if too much time passes between individual output lines of a test. c, maxTimeInSeconds in the CI. This does exactly the same as the androidtestrunner timeout. The CI timeouts can be centrally tuned per platform and Qt module. This is preferable over a special timeout just for android. As other people may be using androidtestrunner for unrelated projects, don't delete the timeout, but simply disable it from CMake by setting it to -1. Task-number: QTBUG-106479 Task-number: QTBUG-101596 Task-number: QTBUG-100242 Change-Id: If4ce00948e204182bb12ac4859d3b0dd193de7ad Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
a1e19c4a8c
commit
00b9409843
@ -203,6 +203,7 @@ function(qt_internal_android_test_arguments target out_test_runner out_test_argu
|
||||
"--skip-install-root"
|
||||
"--make" "${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${target}_make_apk"
|
||||
"--apk" "${apk_dir}/${target}.apk"
|
||||
"--timeout" "-1"
|
||||
"--verbose"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
@ -397,7 +397,8 @@ static bool waitToFinish()
|
||||
// Wait to finish
|
||||
while (isRunning()) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(250));
|
||||
if ((clock::now() - start) > g_options.timeout)
|
||||
if (g_options.timeout >= std::chrono::seconds::zero()
|
||||
&& (clock::now() - start) > g_options.timeout)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user