summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2018-06-05 13:36:09 +0300
committerKatja Marttila <katja.marttila@qt.io>2018-09-14 09:13:20 +0000
commit4d00ecb9778d05525416ed0ea0a5be9a8944ae88 (patch)
tree985ecd2df694ef8e52d78b3b26400f3054ec6bb8 /tests/auto/installer
parentdd21b05b188ab8ee9aee43556d78d006ca9e7376 (diff)
Fix recursive error when there are unstable components
Change-Id: Iecaf849368904a72bae1a1ca6e51b45cfafb54ef Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'tests/auto/installer')
-rw-r--r--tests/auto/installer/solver/tst_solver.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/installer/solver/tst_solver.cpp b/tests/auto/installer/solver/tst_solver.cpp
index 7ae502a5e..d1c3aaa14 100644
--- a/tests/auto/installer/solver/tst_solver.cpp
+++ b/tests/auto/installer/solver/tst_solver.cpp
@@ -32,6 +32,7 @@
#include <uninstallercalculator.h>
#include <componentchecker.h>
#include <packagemanagercore.h>
+#include <settings.h>
#include <QTest>
@@ -208,9 +209,16 @@ private slots:
core->appendRootComponent(componentA);
core->appendRootComponent(componentB);
- QTest::newRow("Installer resolved") << core
- << (QList<Component *>() << componentA)
- << (QList<Component *>());
+ if (core->settings().allowUnstableComponents()) {
+ QTest::newRow("Installer resolved") << core
+ << (QList<Component *>() << componentA)
+ << (QList<Component *>() << componentA);
+ } else {
+ QTest::newRow("Installer resolved") << core
+ << (QList<Component *>() << componentA)
+ << (QList<Component *>());
+ }
+
}
void unresolvedDependencyVersion()