libzypp 17.37.10

TestcaseSetupImpl.h
Go to the documentation of this file.
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
Pool.h
RepoManager.h
Repository.h
SystemCheck.h
TestcaseSetup.h
ZConfig.h
zypp::Arch
Architecture.
Definition Arch.h:37
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:47
zypp::target::Modalias::ModaliasList
std::vector< std::string > ModaliasList
Definition Modalias.h:45
zypp::misc::testcase
Definition LoadTestcase.cc:18
zypp::misc::testcase::TestcaseRepoType
TestcaseRepoType
Definition TestcaseSetup.h:37
zypp::sat::StringQueue
Queue StringQueue
Queue with String ids.
Definition Queue.h:28
zypp::ResolverFocus
ResolverFocus
The resolver's general attitude.
Definition ResolverFocus.h:24
zypp::ResolverFocus::Default
@ Default
Request the standard behavior (as defined in zypp.conf or 'Job')
Definition ResolverFocus.h:25
zypp::base::SetTracker
Track added/removed set items based on an initial set.
Definition SetTracker.h:38
zypp::misc::testcase::ForceInstallImpl
Definition TestcaseSetupImpl.h:34
zypp::misc::testcase::ForceInstallImpl::clone
ForceInstallImpl * clone() const
Definition TestcaseSetupImpl.h:39
zypp::misc::testcase::ForceInstallImpl::channel
std::string channel
Definition TestcaseSetupImpl.h:35
zypp::misc::testcase::ForceInstallImpl::package
std::string package
Definition TestcaseSetupImpl.h:36
zypp::misc::testcase::ForceInstallImpl::kind
std::string kind
Definition TestcaseSetupImpl.h:37
zypp::misc::testcase::RepoDataImpl
Definition TestcaseSetupImpl.h:25
zypp::misc::testcase::RepoDataImpl::type
TestcaseRepoType type
Definition TestcaseSetupImpl.h:26
zypp::misc::testcase::RepoDataImpl::path
std::string path
Definition TestcaseSetupImpl.h:29
zypp::misc::testcase::RepoDataImpl::clone
RepoDataImpl * clone() const
Definition TestcaseSetupImpl.h:31
zypp::misc::testcase::RepoDataImpl::alias
std::string alias
Definition TestcaseSetupImpl.h:27
zypp::misc::testcase::RepoDataImpl::priority
uint priority
Definition TestcaseSetupImpl.h:28
zypp::misc::testcase::TestcaseSetupImpl
Definition TestcaseSetupImpl.h:43
zypp::misc::testcase::TestcaseSetupImpl::allowDowngrade
bool allowDowngrade
Definition TestcaseSetupImpl.h:71
zypp::misc::testcase::TestcaseSetupImpl::ignorealreadyrecommended
bool ignorealreadyrecommended
Definition TestcaseSetupImpl.h:66
zypp::misc::testcase::TestcaseSetupImpl::allowVendorChange
bool allowVendorChange
Definition TestcaseSetupImpl.h:74
zypp::misc::testcase::TestcaseSetupImpl::onlyRequires
bool onlyRequires
Definition TestcaseSetupImpl.h:67
zypp::misc::testcase::TestcaseSetupImpl::hardwareInfoFile
Pathname hardwareInfoFile
Definition TestcaseSetupImpl.h:53
zypp::misc::testcase::TestcaseSetupImpl::multiversionSpec
std::set< std::string > multiversionSpec
Definition TestcaseSetupImpl.h:60
zypp::misc::testcase::TestcaseSetupImpl::dupAllowArchChange
bool dupAllowArchChange
Definition TestcaseSetupImpl.h:78
zypp::misc::testcase::TestcaseSetupImpl::localesTracker
base::SetTracker< LocaleSet > localesTracker
Definition TestcaseSetupImpl.h:57
zypp::misc::testcase::TestcaseSetupImpl::repos
std::vector< RepoData > repos
Definition TestcaseSetupImpl.h:47
zypp::misc::testcase::TestcaseSetupImpl::architecture
Arch architecture
Definition TestcaseSetupImpl.h:44
zypp::misc::testcase::TestcaseSetupImpl::set_licence
bool set_licence
Definition TestcaseSetupImpl.h:63
zypp::misc::testcase::TestcaseSetupImpl::dupAllowDowngrade
bool dupAllowDowngrade
Definition TestcaseSetupImpl.h:76
zypp::misc::testcase::TestcaseSetupImpl::cleandepsOnRemove
bool cleandepsOnRemove
Definition TestcaseSetupImpl.h:69
zypp::misc::testcase::TestcaseSetupImpl::modaliasList
target::Modalias::ModaliasList modaliasList
Definition TestcaseSetupImpl.h:56
zypp::misc::testcase::TestcaseSetupImpl::clone
TestcaseSetupImpl * clone() const
Definition TestcaseSetupImpl.h:81
zypp::misc::testcase::TestcaseSetupImpl::allowNameChange
bool allowNameChange
Definition TestcaseSetupImpl.h:72
zypp::misc::testcase::TestcaseSetupImpl::resolverFocus
ResolverFocus resolverFocus
Definition TestcaseSetupImpl.h:50
zypp::misc::testcase::TestcaseSetupImpl::vendorLists
std::vector< std::vector< std::string > > vendorLists
Definition TestcaseSetupImpl.h:58
zypp::misc::testcase::TestcaseSetupImpl::forceResolve
bool forceResolve
Definition TestcaseSetupImpl.h:68
zypp::misc::testcase::TestcaseSetupImpl::globalPath
Pathname globalPath
Definition TestcaseSetupImpl.h:52
zypp::misc::testcase::TestcaseSetupImpl::allowArchChange
bool allowArchChange
Definition TestcaseSetupImpl.h:73
zypp::misc::testcase::TestcaseSetupImpl::dupAllowNameChange
bool dupAllowNameChange
Definition TestcaseSetupImpl.h:77
zypp::misc::testcase::TestcaseSetupImpl::systemRepo
std::optional< RepoData > systemRepo
Definition TestcaseSetupImpl.h:46
zypp::misc::testcase::TestcaseSetupImpl::systemCheck
Pathname systemCheck
Definition TestcaseSetupImpl.h:54
zypp::misc::testcase::TestcaseSetupImpl::dupAllowVendorChange
bool dupAllowVendorChange
Definition TestcaseSetupImpl.h:79
zypp::misc::testcase::TestcaseSetupImpl::autoinstalled
sat::StringQueue autoinstalled
Definition TestcaseSetupImpl.h:59
zypp::misc::testcase::TestcaseSetupImpl::show_mediaid
bool show_mediaid
Definition TestcaseSetupImpl.h:64
zypp::misc::testcase::TestcaseSetupImpl::forceInstallTasks
std::vector< ForceInstall > forceInstallTasks
Definition TestcaseSetupImpl.h:61
LogControl.h