libept
Main Page
Namespaces
Classes
Files
File List
File Members
ept
test.h
Go to the documentation of this file.
1
//#include <ept/core/apt.h>
2
#include <ept/config.h>
3
#include <
ept/debtags/maint/path.h
>
4
5
#include <wibble/test.h>
6
7
#include <apt-pkg/pkgcache.h>
8
#include <apt-pkg/sourcelist.h>
9
#include <apt-pkg/error.h>
10
#include <apt-pkg/policy.h>
11
#include <apt-pkg/cachefile.h>
12
#include <apt-pkg/progress.h>
13
#include <apt-pkg/pkgcachegen.h>
14
#include <apt-pkg/init.h>
15
16
17
#ifndef EPT_TEST_H
18
#define EPT_TEST_H
19
20
struct
AptTestEnvironment
{
21
//ept::core::AptDatabase db;
22
AptTestEnvironment
() {
23
pkgInitConfig (*_config);
24
_config->Set(
"Initialized"
, 1);
25
_config->Set(
"Dir"
, TEST_ENV_DIR);
26
_config->Set(
"Dir::Cache"
,
"cache"
);
27
_config->Set(
"Dir::State"
,
"state"
);
28
_config->Set(
"Dir::Etc"
,
"etc"
);
29
_config->Set(
"Dir::Etc::sourcelist"
,
"sources.list"
);
30
_config->Set(
"Dir::State::status"
, TEST_ENV_DIR
"dpkg-status"
);
31
pkgInitSystem (*_config, _system);
32
}
33
};
34
35
struct
DebtagsTestEnvironment
:
AptTestEnvironment
{
36
ept::debtags::Path::OverrideDebtagsSourceDir
odsd
;
37
ept::debtags::Path::OverrideDebtagsIndexDir
odid
;
38
ept::debtags::Path::OverrideDebtagsUserSourceDir
odusd
;
39
ept::debtags::Path::OverrideDebtagsUserIndexDir
oduid
;
40
41
DebtagsTestEnvironment
()
42
:
odsd
( TEST_ENV_DIR
"debtags/"
),
43
odid
( TEST_ENV_DIR
"debtags/"
),
44
odusd
( TEST_ENV_DIR
"debtags/"
),
45
oduid
( TEST_ENV_DIR
"debtags/"
)
46
{}
47
};
48
49
#endif
Generated on Sat Nov 2 2013 08:30:07 for libept by
1.8.1.2