projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
abort connection on '.' target replies in SRV
[apt.git]
/
test
/
libapt
/
gtest_runner.cc
diff --git
a/test/libapt/gtest_runner.cc
b/test/libapt/gtest_runner.cc
index 5823c55de65de4d72e20d39a94be587417b02dd3..73854d97686c6e336422c250b776e753beac51ad 100644
(file)
--- a/
test/libapt/gtest_runner.cc
+++ b/
test/libapt/gtest_runner.cc
@@
-1,8
+1,15
@@
#include <gtest/gtest.h>
#include <gtest/gtest.h>
+
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/error.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/init.h>
+
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
- int result = RUN_ALL_TESTS();
+ if (pkgInitSystem(*_config, _system) == false)
+ return 42;
+ int const result = RUN_ALL_TESTS();
if (_error->empty() == false)
{
std::cerr << "The test generated the following global messages:" << std::endl;
if (_error->empty() == false)
{
std::cerr << "The test generated the following global messages:" << std::endl;