summaryrefslogtreecommitdiffstats
path: root/tests/packagecreator/tst_packagecreator.cpp
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2017-05-12 15:40:44 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2017-05-16 08:09:27 +0000
commit0fefc2d72edd4dfbb93faa4825b18d3c64201f0a (patch)
treebdbe450678bff37a95179c5816ce2a3278613382 /tests/packagecreator/tst_packagecreator.cpp
parent582b5da5f2ab145e62cf8bb2afafbd12c779b62b (diff)
Extend timeout-factor correction from auto-tests to the appman itself
All hardcoded timed waits can now be prolonged by running the appman (or the auto-tests) with $AM_TIMEOUT_FACTOR set to an integer value > 1. This is especially useful when running under valgrind. Change-Id: I96094281e70cc681584524d8475f09a976074b8a Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'tests/packagecreator/tst_packagecreator.cpp')
-rw-r--r--tests/packagecreator/tst_packagecreator.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/packagecreator/tst_packagecreator.cpp b/tests/packagecreator/tst_packagecreator.cpp
index 07883673..d4f2695d 100644
--- a/tests/packagecreator/tst_packagecreator.cpp
+++ b/tests/packagecreator/tst_packagecreator.cpp
@@ -37,7 +37,6 @@
QT_USE_NAMESPACE_AM
-static int timeoutFactor = 1; // useful to increase timeouts when running in valgrind
static int processTimeout = 3000;
class tst_PackageCreator : public QObject
@@ -68,9 +67,7 @@ tst_PackageCreator::tst_PackageCreator()
void tst_PackageCreator::initTestCase()
{
- timeoutFactor = qMax(1, qEnvironmentVariableIntValue("TIMEOUT_FACTOR"));
- processTimeout *= timeoutFactor;
- qInfo() << "Timeouts are multiplied by" << timeoutFactor << "(changed by (un)setting $TIMEOUT_FACTOR)";
+ processTimeout *= timeoutFactor();
// check if tar command is available at all
QProcess tar;