]> git.saurik.com Git - apt.git/blobdiff - test/libapt/gtest_runner.cc
Make directory paths configurable
[apt.git] / test / libapt / gtest_runner.cc
index 29f6313269deb9ab390a8293ba8524422e503877..73854d97686c6e336422c250b776e753beac51ad 100644 (file)
@@ -1,14 +1,15 @@
 #include <gtest/gtest.h>
 
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/error.h>
-#include <apt-pkg/cmndline.h>
-
-bool ShowHelp(CommandLine &, CommandLine::DispatchWithHelp const *) {return false;}
-std::vector<CommandLine::DispatchWithHelp> GetCommands() {return {};}
+#include <apt-pkg/init.h>
 
 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;