libzypp  17.37.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/Globals.h>
18 #include <zypp/Locale.h>
19 #include <zypp/Pathname.h>
20 #include <zypp/ResolverFocus.h>
21 #include <zypp/Url.h>
22 #include <zypp/base/PtrTypes.h>
23 #include <zypp/base/SetTracker.h>
24 #include <zypp/sat/Queue.h>
26 
27 #include <optional>
28 #include <vector>
29 
30 namespace zypp {
31  class RepoManager;
32 }
33 
34 namespace zypp::misc::testcase
35 {
36 
37  enum class TestcaseRepoType {
38  Helix,
39  Testtags,
40  Url
41  };
42 
43  struct RepoDataImpl;
44  struct ForceInstallImpl;
45  struct TestcaseSetupImpl;
46 
47  class RepoData {
48  public:
49  RepoData ();
50  ~RepoData ();
52  TestcaseRepoType type() const;
53  const std::string &alias() const;
54  uint priority() const;
55  const std::string &path() const;
56 
57  const RepoDataImpl &data() const;
58  RepoDataImpl &data();
59  private:
61  };
62 
64  public:
65  ForceInstall ();
66  ~ForceInstall ();
67  ForceInstall ( ForceInstallImpl &&data );
68  const std::string &channel () const;
69  const std::string &package () const;
70  const std::string &kind () const;
71 
72  const ForceInstallImpl &data() const;
73  ForceInstallImpl &data();
74  private:
76  };
77 
79  {
80  public:
81 
82  TestcaseSetup();
83  ~TestcaseSetup();
84 
85  Arch architecture () const;
86 
87  const std::optional<RepoData> &systemRepo() const;
88  const std::vector<RepoData> &repos() const;
89 
90  // solver flags: default to false - set true if mentioned in <setup>
91  ResolverFocus resolverFocus() const;
92 
93  const Pathname &globalPath() const;
94  const Pathname &hardwareInfoFile() const;
95  const Pathname &systemCheck() const;
96 
97  const target::Modalias::ModaliasList &modaliasList() const;
98  const base::SetTracker<LocaleSet> &localesTracker() const;
99  const std::vector<std::vector<std::string>> &vendorLists() const;
100  const sat::StringQueue &autoinstalled() const;
101  const std::set<std::string> &multiversionSpec() const;
102  const std::vector<ForceInstall> &forceInstallTasks() const;
103 
104  bool set_licence() const;
105  bool show_mediaid() const;
106 
107  bool ignorealreadyrecommended() const;
108  bool onlyRequires() const;
109  bool forceResolve() const;
110  bool cleandepsOnRemove() const;
111 
112  bool allowDowngrade() const;
113  bool allowNameChange() const;
114  bool allowArchChange() const;
115  bool allowVendorChange() const;
116 
117  bool dupAllowDowngrade() const;
118  bool dupAllowNameChange() const;
119  bool dupAllowArchChange() const;
120  bool dupAllowVendorChange() const;
121 
122  bool applySetup ( zypp::RepoManager &manager ) const;
123 
124  static bool loadRepo (zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data );
125 
126  TestcaseSetupImpl &data();
127  const TestcaseSetupImpl &data() const;
128 
129  private:
131  };
132 
133 }
134 
135 
136 #endif // ZYPP_MISC_TESTCASESETUPIMPL_H
Architecture.
Definition: Arch.h:36
ResolverFocus
The resolver&#39;s general attitude.
Definition: ResolverFocus.h:23
const RepoDataImpl & data() const
RWCOW_pointer< TestcaseSetupImpl > _pimpl
_onlyRequires _dup_allowdowngrade dupAllowArchChange
Definition: Resolver.cc:176
const std::string & path() const
RWCOW_pointer< ForceInstallImpl > _pimpl
Definition: TestcaseSetup.h:75
creates and provides information about known sources.
Definition: RepoManager.cc:38
#define ZYPP_API_DEPTESTOMATIC
Definition: Globals.h:77
const std::string & alias() const
TestcaseRepoType type() const
Libsolv Id queue wrapper.
Definition: Queue.h:35
_onlyRequires dupAllowDowngrade
Definition: Resolver.cc:174
std::vector< std::string > ModaliasList
Definition: Modalias.h:45
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
Url manipulation class.
Definition: Url.h:92
RW_pointer supporting &#39;copy on write&#39; functionality.
Definition: PtrTypes.h:468
RWCOW_pointer< RepoDataImpl > _pimpl
Definition: TestcaseSetup.h:60