1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/misc/LoadTestcase.h
12 #ifndef ZYPP_MISC_LOADTESTCASE_H
13 #define ZYPP_MISC_LOADTESTCASE_H
15 #include <zypp/Arch.h>
16 #include <zypp/Locale.h>
17 #include <zypp/Pathname.h>
18 #include <zypp/ResolverFocus.h>
20 #include <zypp/base/PtrTypes.h>
21 #include <zypp/base/SetTracker.h>
22 #include <zypp/base/NonCopyable.h>
23 #include <zypp/sat/Queue.h>
24 #include <zypp/target/modalias/Modalias.h>
33 namespace zypp::misc::testcase {
35 enum class TestcaseRepoType {
42 TestcaseRepoType type;
56 Arch architecture = Arch_noarch;
58 std::optional<RepoData> systemRepo;
59 std::vector<RepoData> repos;
61 // solver flags: default to false - set true if mentioned in <setup>
62 ResolverFocus resolverFocus = ResolverFocus::Default;
65 Pathname hardwareInfoFile;
68 target::Modalias::ModaliasList modaliasList;
69 base::SetTracker<LocaleSet> localesTracker;
70 sat::StringQueue autoinstalled;
71 std::set<std::string> multiversionSpec;
72 std::vector<ForceInstall> forceInstallTasks;
74 bool set_licence = false;
75 bool show_mediaid = false;
77 bool ignorealreadyrecommended = false;
78 bool onlyRequires = false;
79 bool forceResolve = false;
80 bool cleandepsOnRemove = false;
82 bool allowDowngrade = false;
83 bool allowNameChange = false;
84 bool allowArchChange = false;
85 bool allowVendorChange = false;
87 bool dupAllowDowngrade = false;
88 bool dupAllowNameChange = false;
89 bool dupAllowArchChange = false;
90 bool dupAllowVendorChange = false;
92 bool applySetup ( zypp::RepoManager &manager ) const;
94 static bool loadRepo (zypp::RepoManager &manager, const TestcaseSetup &setup, const RepoData &data );
103 const std::string &getProp( const std::string &name, const std::string &def = std::string() ) const;
105 std::map<std::string, std::string> properties;
106 std::vector<std::shared_ptr<Node>> children;
108 std::vector<Node> nodes;
111 class LoadTestcase : private zypp::base::NonCopyable
125 bool loadTestcaseAt ( const zypp::Pathname &path, std::string *err );
126 static Type testcaseTypeAt ( const zypp::Pathname &path );
128 const TestcaseSetup &setupInfo() const;
129 const std::vector<TestcaseTrial> &trialInfo() const;
132 std::unique_ptr<Impl> _pimpl;
138 #endif // ZYPP_MISC_LOADTESTCASE_H