enum TestSetupOptionBits
{
- TSO_CLEANROOT = (1 << 0), // wipe rootdir in ctor
- TSO_REPO_DEFAULT_GPG = (1 << 1), // dont turn off gpgcheck in repos
+ TSO_CLEANROOT = (1 << 0)
};
ZYPP_DECLARE_FLAGS_AND_OPERATORS( TestSetupOptions, TestSetupOptionBits );
typedef TestSetupOptions Options;
public:
- TestSetup( const Arch & sysarch_r = Arch_empty, const Options & options_r = Options() )
- { _ctor( Pathname(), sysarch_r, options_r ); }
+ TestSetup( const Arch & sysarch_r = Arch_empty )
+ { _ctor( Pathname(), sysarch_r, Options() ); }
TestSetup( const Pathname & rootdir_r, const Arch & sysarch_r = Arch_empty, const Options & options_r = Options() )
{ _ctor( rootdir_r, sysarch_r, options_r ); }
RepoInfo nrepo;
nrepo.setAlias( alias_r.empty() ? url_r.getHost()+":"+Pathname::basename(url_r.getPathName()) : alias_r );
nrepo.addBaseUrl( url_r );
- if ( ! _options.testFlag( TSO_REPO_DEFAULT_GPG ) )
- nrepo.setGpgCheck( false );
+ nrepo.setGpgCheck( false );
loadRepo( nrepo );
}
/** Directly load repo from metadata(dir) or solvfile(file) to pool.
}
//
- filesystem::Glob files( path_r/"*{.xml,.xml.gz}", filesystem::Glob::_BRACE );
+ filesystem::Glob files( path_r/"*{.xml,.xml.gz}", filesystem::Glob::kBrace );
for_( it, files.begin(), files.end() )
{
std::string basename( Pathname::basename( *it ) );
private:
void _ctor( const Pathname & rootdir_r, const Arch & sysarch_r, const Options & options_r )
{
- _options = options_r;
-
if ( rootdir_r.empty() )
_rootdir = _tmprootdir.path();
else
{
filesystem::assert_dir( (_rootdir = rootdir_r) );
- if ( _options.testFlag( TSO_CLEANROOT ) )
+ if ( options_r.testFlag( TSO_CLEANROOT ) )
filesystem::clean_dir( _rootdir );
}
private:
filesystem::TmpDir _tmprootdir;
Pathname _rootdir;
- Options _options;
};