From b7aa74a1859e3be00f3a20b0956d1cb93d62df5b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 26 Jan 2016 17:42:33 +0100 Subject: stablize gtest testcase environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid the dependency on a specific current path for the tar test and ensure that _system is correctly initialized (gcc-6 runs into a segfault otherwise and with it fixed starts to depend on the multi-arch configuration of the running system… not good). Git-Dch: Ignore --- test/libapt/gtest_runner.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/libapt/gtest_runner.cc') diff --git a/test/libapt/gtest_runner.cc b/test/libapt/gtest_runner.cc index 46054afa3..73854d976 100644 --- a/test/libapt/gtest_runner.cc +++ b/test/libapt/gtest_runner.cc @@ -1,10 +1,15 @@ #include +#include +#include #include +#include 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; -- cgit v1.2.3-70-g09d2