libzypp  17.28.5
TestcaseSetup.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
13 #ifndef ZYPP_MISC_TESTCASESETUP_H
14 #define ZYPP_MISC_TESTCASESETUP_H
15 
16 #include <zypp/Arch.h>
17 #include <zypp/Locale.h>
18 #include <zypp/Pathname.h>
19 #include <zypp/ResolverFocus.h>
20 #include <zypp/Url.h>
21 #include <zypp/base/PtrTypes.h>
22 #include <zypp/base/SetTracker.h>
23 #include <zypp/sat/Queue.h>
25 
26 #include <optional>
27 #include <vector>
28 
29 namespace zypp {
30  class RepoManager;
31 }
32 
33 namespace zypp::misc::testcase
34 {
35 
36  enum class TestcaseRepoType {
37  Helix,
38  Testtags,
39  Url
40  };
41 
42  struct RepoDataImpl;
43  struct ForceInstallImpl;
44  struct TestcaseSetupImpl;
45 
46  class RepoData {
47  public:
48  RepoData ();
49  ~RepoData ();
51  TestcaseRepoType type() const;
52  const std::string &alias() const;
53  uint priority() const;
54  const std::string &path() const;
55 
56  const RepoDataImpl &data() const;
57  RepoDataImpl &data();
58  private:
60  };
61 
62  class ForceInstall {
63  public:
64  ForceInstall ();
65  ~ForceInstall ();
67  const std::string &channel () const;
68  const std::string &package () const;
69  const std::string &kind () const;
70 
71  const ForceInstallImpl &data() const;
73  private:
75  };
76 
78  {
79  public:
80 
81  TestcaseSetup();
83 
84  Arch architecture () const;
85 
86  const std::optional<RepoData> &systemRepo() const;
87  const std::vector<RepoData> &repos() const;
88 
89  // solver flags: default to false - set true if mentioned in <setup>
91 
92  const Pathname &globalPath() const;
93  const Pathname &hardwareInfoFile() const;
94  const Pathname &systemCheck() const;
95 
98  const std::vector<std::vector<std::string>> &vendorLists() const;
99  const sat::StringQueue &autoinstalled() const;
100  const std::set<std::string> &multiversionSpec() const;
101  const std::vector<ForceInstall> &forceInstallTasks() const;
102 
103  bool set_licence() const;
104  bool show_mediaid() const;
105 
106  bool ignorealreadyrecommended() const;
107  bool onlyRequires() const;
108  bool forceResolve() const;
109  bool cleandepsOnRemove() const;
110 
111  bool allowDowngrade() const;
112  bool allowNameChange() const;
113  bool allowArchChange() const;
114  bool allowVendorChange() const;
115 
116  bool dupAllowDowngrade() const;
117  bool dupAllowNameChange() const;
118  bool dupAllowArchChange() const;
119  bool dupAllowVendorChange() const;
120 
121  bool applySetup ( zypp::RepoManager &manager ) const;
122 
123  static bool loadRepo (zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data );
124 
126  const TestcaseSetupImpl &data() const;
127 
128  private:
130  };
131 
132 }
133 
134 
135 #endif // ZYPP_MISC_TESTCASESETUPIMPL_H
ResolverFocus resolverFocus() const
const std::string & package() const
const std::string & kind() const
const std::vector< ForceInstall > & forceInstallTasks() const
Architecture.
Definition: Arch.h:36
ResolverFocus
The resolvers general attitude.
Definition: ResolverFocus.h:21
const RepoDataImpl & data() const
const std::set< std::string > & multiversionSpec() const
const std::vector< RepoData > & repos() const
const ForceInstallImpl & data() const
RWCOW_pointer< TestcaseSetupImpl > _pimpl
const base::SetTracker< LocaleSet > & localesTracker() const
const Pathname & systemCheck() const
const std::string & path() const
RWCOW_pointer< ForceInstallImpl > _pimpl
Definition: TestcaseSetup.h:74
const std::vector< std::vector< std::string > > & vendorLists() const
const std::string & alias() const
TestcaseRepoType type() const
std::vector< std::string > ModaliasList
Definition: Modalias.h:41
Libsolv Id queue wrapper.
Definition: Queue.h:34
creates and provides information about known sources.
Definition: RepoManager.h:105
const std::string & channel() const
bool applySetup(zypp::RepoManager &manager) const
static bool loadRepo(zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data)
const Pathname & globalPath() const
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
const sat::StringQueue & autoinstalled() const
const Pathname & hardwareInfoFile() const
const std::optional< RepoData > & systemRepo() const
Url manipulation class.
Definition: Url.h:91
const target::Modalias::ModaliasList & modaliasList() const
RW_pointer supporting &#39;copy on write&#39; functionality.
Definition: PtrTypes.h:458
RWCOW_pointer< RepoDataImpl > _pimpl
Definition: TestcaseSetup.h:59