Imported Upstream version 17.25.4
[platform/upstream/libzypp.git] / zypp / misc / TestcaseSetupImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9
10 #ifndef ZYPP_MISC_TESTCASESETUPIMPL_H
11 #define ZYPP_MISC_TESTCASESETUPIMPL_H
12
13 #include <zypp/misc/TestcaseSetup.h>
14 #include <zypp/ZConfig.h>
15 #include <zypp/base/LogControl.h>
16 #include <zypp/Repository.h>
17 #include <zypp/RepoManager.h>
18 #include <zypp/sat/Pool.h>
19
20 #define ZYPP_USE_RESOLVER_INTERNALS
21 #include <zypp/solver/detail/SystemCheck.h>
22
23 namespace zypp::misc::testcase
24 {
25   struct RepoDataImpl {
26     TestcaseRepoType type;
27     std::string alias;
28     uint priority = 99;
29     std::string path;
30
31     RepoDataImpl *clone () const { return new RepoDataImpl(*this); }
32   };
33
34   struct ForceInstallImpl {
35     std::string channel;
36     std::string package;
37     std::string kind;
38
39     ForceInstallImpl *clone () const { return new ForceInstallImpl(*this); }
40   };
41
42   struct TestcaseSetupImpl
43   {
44     Arch architecture = Arch_noarch;
45
46     std::optional<RepoData> systemRepo;
47     std::vector<RepoData> repos;
48
49     // solver flags: default to false - set true if mentioned in <setup>
50     ResolverFocus resolverFocus  = ResolverFocus::Default;
51
52     Pathname globalPath;
53     Pathname hardwareInfoFile;
54     Pathname systemCheck;
55
56     target::Modalias::ModaliasList modaliasList;
57     base::SetTracker<LocaleSet> localesTracker;
58     std::vector<std::vector<std::string>> vendorLists;
59     sat::StringQueue autoinstalled;
60     std::set<std::string> multiversionSpec;
61     std::vector<ForceInstall> forceInstallTasks;
62
63     bool set_licence = false;
64     bool show_mediaid = false;
65
66     bool ignorealreadyrecommended   = false;
67     bool onlyRequires               = false;
68     bool forceResolve               = false;
69     bool cleandepsOnRemove          = false;
70
71     bool allowDowngrade     = false;
72     bool allowNameChange    = false;
73     bool allowArchChange    = false;
74     bool allowVendorChange  = false;
75
76     bool dupAllowDowngrade     = false;
77     bool dupAllowNameChange    = false;
78     bool dupAllowArchChange    = false;
79     bool dupAllowVendorChange  = false;
80
81     TestcaseSetupImpl *clone () const { return new TestcaseSetupImpl(*this); }
82   };
83 }
84
85 #endif