diff options
author | Arne Morten Kvarving <cptspiff@gmail.com> | 2015-01-14 12:18:12 +0100 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2015-01-14 23:51:28 +0100 |
commit | 2e36e3516850fb7c85d8ab80eeef6d7dd75dc98a (patch) | |
tree | e711ddd7c26217531b9a20e8cc1c3d03fac823a1 | |
parent | 48aa36b2143763102b5df3cceb1cba68d46927dd (diff) |
fixed: URIUtils.IsRemote test (now) accesses the network member in g_application
fix by setting up network in the test environment
-rw-r--r-- | xbmc/Application.cpp | 8 | ||||
-rw-r--r-- | xbmc/Application.h | 1 | ||||
-rw-r--r-- | xbmc/test/TestBasicEnvironment.cpp | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index f73193a625..1fa4ed7a13 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -595,7 +595,7 @@ void CApplication::Preflight() #endif } -bool CApplication::Create() +bool CApplication::SetupNetwork() { #if defined(HAS_LINUX_NETWORK) m_network = new CNetworkLinux(); @@ -605,6 +605,12 @@ bool CApplication::Create() m_network = new CNetwork(); #endif + return m_network != NULL; +} + +bool CApplication::Create() +{ + SetupNetwork(); Preflight(); for (int i = RES_HDTV_1080i; i <= RES_PAL60_16x9; i++) diff --git a/xbmc/Application.h b/xbmc/Application.h index d706145006..711db3da16 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -196,6 +196,7 @@ public: void CheckScreenSaverAndDPMS(); void CheckPlayingProgress(); void ActivateScreenSaver(bool forceType = false); + bool SetupNetwork(); void CloseNetworkShares(); void ShowAppMigrationMessage(); diff --git a/xbmc/test/TestBasicEnvironment.cpp b/xbmc/test/TestBasicEnvironment.cpp index 239bfd4790..18ca012945 100644 --- a/xbmc/test/TestBasicEnvironment.cpp +++ b/xbmc/test/TestBasicEnvironment.cpp @@ -27,6 +27,7 @@ #include "settings/AdvancedSettings.h" #include "settings/Settings.h" #include "Util.h" +#include "Application.h" #include <cstdio> #include <cstdlib> @@ -43,6 +44,9 @@ void TestBasicEnvironment::SetUp() */ g_advancedSettings.Initialize(); + // Need to configure the network as some tests access the network member + g_application.SetupNetwork(); + if (!CXBMCTestUtils::Instance().SetReferenceFileBasePath()) SetUpError(); CXBMCTestUtils::Instance().setTestFileFactoryWriteInputFile( |