From 0b9cd83642f297687989b0813a9dca83cc78cc15 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 25 Oct 2010 14:53:58 -0700 Subject: CHOP-122 Adding stub background updater files to the build. Rev. by brad --- .../updater/tests/llupdaterservice_test.cpp | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 indra/viewer_components/updater/tests/llupdaterservice_test.cpp (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp new file mode 100644 index 0000000000..37d1c8243e --- /dev/null +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -0,0 +1,59 @@ +/** + * @file llupdaterservice_test.cpp + * @brief Tests of llupdaterservice.cpp. + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "../llupdaterservice.h" + +#include "../../../test/lltut.h" +//#define DEBUG_ON +#include "../../../test/debug.h" + +/***************************************************************************** +* TUT +*****************************************************************************/ +namespace tut +{ + struct llupdaterservice_data + { + llupdaterservice_data() : + pumps(LLEventPumps::instance()) + {} + LLEventPumps& pumps; + }; + + typedef test_group llupdaterservice_group; + typedef llviewerlogin_group::object llupdaterservice_object; + llupdaterservice_group llupdaterservicegrp("LLUpdaterService"); + + template<> template<> + void llupdateservice_object::test<1>() + { + DEBUG; + ensure_equals("Dummy", "true", "true"); + } +} -- cgit v1.2.3 From 34db27c26f9a5627b733cc8a04265afed68d199c Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 26 Oct 2010 15:00:34 -0700 Subject: CHOP-122 Mowr work on the llupdater facade... Added LLPluginProcessParent, including mockery for unit tests. Re. by Jenn --- .../updater/tests/llupdaterservice_test.cpp | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 37d1c8243e..9edf15ba11 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -33,6 +33,28 @@ //#define DEBUG_ON #include "../../../test/debug.h" +#include "llevents.h" +#include "llpluginprocessparent.h" + +/***************************************************************************** +* MOCK'd +*****************************************************************************/ +LLPluginProcessParentOwner::~LLPluginProcessParentOwner() {} +LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) +: mOwner(owner), + mIncomingQueueMutex(NULL) +{ +} + +LLPluginProcessParent::~LLPluginProcessParent() {} +LLPluginMessagePipeOwner::LLPluginMessagePipeOwner(){} +LLPluginMessagePipeOwner::~LLPluginMessagePipeOwner(){} +void LLPluginProcessParent::receiveMessageRaw(const std::string &message) {} +int LLPluginMessagePipeOwner::socketError(int) { return 0; } +void LLPluginProcessParent::setMessagePipe(LLPluginMessagePipe *message_pipe) {} +void LLPluginMessagePipeOwner::setMessagePipe(class LLPluginMessagePipe *) {} +LLPluginMessage::~LLPluginMessage() {} + /***************************************************************************** * TUT *****************************************************************************/ @@ -47,13 +69,13 @@ namespace tut }; typedef test_group llupdaterservice_group; - typedef llviewerlogin_group::object llupdaterservice_object; + typedef llupdaterservice_group::object llupdaterservice_object; llupdaterservice_group llupdaterservicegrp("LLUpdaterService"); template<> template<> - void llupdateservice_object::test<1>() + void llupdaterservice_object::test<1>() { DEBUG; - ensure_equals("Dummy", "true", "true"); + ensure_equals("Dummy", 0, 0); } } -- cgit v1.2.3 From be8c9fc21758bcbc1d9f3d565b221310344231bd Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 27 Oct 2010 17:07:31 -0700 Subject: CHOP-122 Initializing Facade service in the viewer. Rev. by Brad. --- .../updater/tests/llupdaterservice_test.cpp | 195 +++++++++++++-------- 1 file changed, 121 insertions(+), 74 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 9edf15ba11..73cf6ea6eb 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -1,50 +1,50 @@ -/** - * @file llupdaterservice_test.cpp - * @brief Tests of llupdaterservice.cpp. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -// Precompiled header -#include "linden_common.h" -// associated header -#include "../llupdaterservice.h" - -#include "../../../test/lltut.h" -//#define DEBUG_ON -#include "../../../test/debug.h" - -#include "llevents.h" -#include "llpluginprocessparent.h" - -/***************************************************************************** -* MOCK'd -*****************************************************************************/ -LLPluginProcessParentOwner::~LLPluginProcessParentOwner() {} -LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) -: mOwner(owner), - mIncomingQueueMutex(NULL) -{ -} +/** + * @file llupdaterservice_test.cpp + * @brief Tests of llupdaterservice.cpp. + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "../llupdaterservice.h" + +#include "../../../test/lltut.h" +//#define DEBUG_ON +#include "../../../test/debug.h" + +#include "llevents.h" +#include "llpluginprocessparent.h" + +/***************************************************************************** +* MOCK'd +*****************************************************************************/ +LLPluginProcessParentOwner::~LLPluginProcessParentOwner() {} +LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) +: mOwner(owner), + mIncomingQueueMutex(gAPRPoolp) +{ +} LLPluginProcessParent::~LLPluginProcessParent() {} LLPluginMessagePipeOwner::LLPluginMessagePipeOwner(){} @@ -52,30 +52,77 @@ LLPluginMessagePipeOwner::~LLPluginMessagePipeOwner(){} void LLPluginProcessParent::receiveMessageRaw(const std::string &message) {} int LLPluginMessagePipeOwner::socketError(int) { return 0; } void LLPluginProcessParent::setMessagePipe(LLPluginMessagePipe *message_pipe) {} -void LLPluginMessagePipeOwner::setMessagePipe(class LLPluginMessagePipe *) {} -LLPluginMessage::~LLPluginMessage() {} - -/***************************************************************************** -* TUT -*****************************************************************************/ -namespace tut -{ - struct llupdaterservice_data - { - llupdaterservice_data() : - pumps(LLEventPumps::instance()) - {} - LLEventPumps& pumps; - }; - - typedef test_group llupdaterservice_group; - typedef llupdaterservice_group::object llupdaterservice_object; - llupdaterservice_group llupdaterservicegrp("LLUpdaterService"); - - template<> template<> - void llupdaterservice_object::test<1>() - { - DEBUG; - ensure_equals("Dummy", 0, 0); - } -} +void LLPluginMessagePipeOwner::setMessagePipe(class LLPluginMessagePipe *) {} +LLPluginMessage::~LLPluginMessage() {} + +/***************************************************************************** +* TUT +*****************************************************************************/ +namespace tut +{ + struct llupdaterservice_data + { + llupdaterservice_data() : + pumps(LLEventPumps::instance()), + test_url("dummy_url"), + test_channel("dummy_channel"), + test_version("dummy_version") + {} + LLEventPumps& pumps; + std::string test_url; + std::string test_channel; + std::string test_version; + }; + + typedef test_group llupdaterservice_group; + typedef llupdaterservice_group::object llupdaterservice_object; + llupdaterservice_group llupdaterservicegrp("LLUpdaterService"); + + template<> template<> + void llupdaterservice_object::test<1>() + { + DEBUG; + LLUpdaterService updater; + bool got_usage_error = false; + try + { + updater.startChecking(); + } + catch(LLUpdaterService::UsageError) + { + got_usage_error = true; + } + ensure("Caught start before params", got_usage_error); + } + + template<> template<> + void llupdaterservice_object::test<2>() + { + DEBUG; + LLUpdaterService updater; + bool got_usage_error = false; + try + { + updater.setParams(test_url, test_channel, test_version); + updater.startChecking(); + updater.setParams("other_url", test_channel, test_version); + } + catch(LLUpdaterService::UsageError) + { + got_usage_error = true; + } + ensure("Caught params while running", got_usage_error); + } + + template<> template<> + void llupdaterservice_object::test<3>() + { + DEBUG; + LLUpdaterService updater; + updater.setParams(test_url, test_channel, test_version); + updater.startChecking(); + ensure(updater.isChecking()); + updater.stopChecking(); + ensure(!updater.isChecking()); + } +} -- cgit v1.2.3 From ca9594af28ce2e1cc8bb333a0fa7384dae718a9a Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 28 Oct 2010 16:47:05 -0700 Subject: shell of the update checker; it will just print a message to the log depending on the result of the check one time. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 73cf6ea6eb..d93a85cf7d 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -28,6 +28,7 @@ #include "linden_common.h" // associated header #include "../llupdaterservice.h" +#include "../llupdatechecker.h" #include "../../../test/lltut.h" //#define DEBUG_ON @@ -54,6 +55,11 @@ int LLPluginMessagePipeOwner::socketError(int) { return 0; } void LLPluginProcessParent::setMessagePipe(LLPluginMessagePipe *message_pipe) {} void LLPluginMessagePipeOwner::setMessagePipe(class LLPluginMessagePipe *) {} LLPluginMessage::~LLPluginMessage() {} +LLPluginMessage::LLPluginMessage(LLPluginMessage const&) {} + +LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client) +{} +void LLUpdateChecker::check(std::string const & host, std::string channel, std::string version){} /***************************************************************************** * TUT -- cgit v1.2.3 From 7622ab9249506539894d0e33d4c2a8fd9fb3e3ac Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 4 Nov 2010 11:33:02 -0700 Subject: just barely working udate downloading service; missing little nicities like error checking and sill stuff like that. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index d93a85cf7d..0ffc1f2c70 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -29,6 +29,7 @@ // associated header #include "../llupdaterservice.h" #include "../llupdatechecker.h" +#include "../llupdatedownloader.h" #include "../../../test/lltut.h" //#define DEBUG_ON @@ -60,6 +61,9 @@ LLPluginMessage::LLPluginMessage(LLPluginMessage const&) {} LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client) {} void LLUpdateChecker::check(std::string const & host, std::string channel, std::string version){} +LLUpdateDownloader::LLUpdateDownloader(LLUpdateDownloader::Client & client) +{} +void LLUpdateDownloader::download(LLURI const & ){} /***************************************************************************** * TUT -- cgit v1.2.3 From dfeb7abe5f690bbd3a908c84c53bbea20a5adb7c Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 4 Nov 2010 14:08:14 -0700 Subject: checker working with v1.0 update protocol. --- .../viewer_components/updater/tests/llupdaterservice_test.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 0ffc1f2c70..958526e35b 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -60,9 +60,10 @@ LLPluginMessage::LLPluginMessage(LLPluginMessage const&) {} LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client) {} -void LLUpdateChecker::check(std::string const & host, std::string channel, std::string version){} -LLUpdateDownloader::LLUpdateDownloader(LLUpdateDownloader::Client & client) +void LLUpdateChecker::check(std::string const & protocolVersion, std::string const & hostUrl, + std::string const & servicePath, std::string channel, std::string version) {} +LLUpdateDownloader::LLUpdateDownloader(Client & ) {} void LLUpdateDownloader::download(LLURI const & ){} /***************************************************************************** @@ -113,9 +114,9 @@ namespace tut bool got_usage_error = false; try { - updater.setParams(test_url, test_channel, test_version); + updater.setParams("1.0",test_url, "update" ,test_channel, test_version); updater.startChecking(); - updater.setParams("other_url", test_channel, test_version); + updater.setParams("1.0", "other_url", "update", test_channel, test_version); } catch(LLUpdaterService::UsageError) { @@ -129,7 +130,7 @@ namespace tut { DEBUG; LLUpdaterService updater; - updater.setParams(test_url, test_channel, test_version); + updater.setParams("1.0", test_url, "update", test_channel, test_version); updater.startChecking(); ensure(updater.isChecking()); updater.stopChecking(); -- cgit v1.2.3 From 191e164a503b72c7feae0a46ad0422740b365556 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 4 Nov 2010 15:49:19 -0700 Subject: some better error handling. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 958526e35b..20d0f8fa09 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -64,7 +64,7 @@ void LLUpdateChecker::check(std::string const & protocolVersion, std::string con std::string const & servicePath, std::string channel, std::string version) {} LLUpdateDownloader::LLUpdateDownloader(Client & ) {} -void LLUpdateDownloader::download(LLURI const & ){} +void LLUpdateDownloader::download(LLURI const & , std::string const &){} /***************************************************************************** * TUT -- cgit v1.2.3 From e1016b5bc7cda03fed98b10f1ee5615245495e00 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 8 Nov 2010 09:49:38 -0800 Subject: Removed refrences to SLPlugin from LLUpdaterService and test. --- .../updater/tests/llupdaterservice_test.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 20d0f8fa09..7f45ae51fb 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -36,28 +36,10 @@ #include "../../../test/debug.h" #include "llevents.h" -#include "llpluginprocessparent.h" /***************************************************************************** * MOCK'd *****************************************************************************/ -LLPluginProcessParentOwner::~LLPluginProcessParentOwner() {} -LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) -: mOwner(owner), - mIncomingQueueMutex(gAPRPoolp) -{ -} - -LLPluginProcessParent::~LLPluginProcessParent() {} -LLPluginMessagePipeOwner::LLPluginMessagePipeOwner(){} -LLPluginMessagePipeOwner::~LLPluginMessagePipeOwner(){} -void LLPluginProcessParent::receiveMessageRaw(const std::string &message) {} -int LLPluginMessagePipeOwner::socketError(int) { return 0; } -void LLPluginProcessParent::setMessagePipe(LLPluginMessagePipe *message_pipe) {} -void LLPluginMessagePipeOwner::setMessagePipe(class LLPluginMessagePipe *) {} -LLPluginMessage::~LLPluginMessage() {} -LLPluginMessage::LLPluginMessage(LLPluginMessage const&) {} - LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client) {} void LLUpdateChecker::check(std::string const & protocolVersion, std::string const & hostUrl, -- cgit v1.2.3 From b2e84d739b4f5c00b497e57e892fc10d78af8b76 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 10 Nov 2010 14:26:14 -0800 Subject: CHOP-151 Adding startup updater flow to drive update installation and resume. --- .../updater/tests/llupdaterservice_test.cpp | 71 +++++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 7f45ae51fb..57732ad0a5 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -36,6 +36,7 @@ #include "../../../test/debug.h" #include "llevents.h" +#include "lldir.h" /***************************************************************************** * MOCK'd @@ -48,6 +49,70 @@ void LLUpdateChecker::check(std::string const & protocolVersion, std::string con LLUpdateDownloader::LLUpdateDownloader(Client & ) {} void LLUpdateDownloader::download(LLURI const & , std::string const &){} +class LLDir_Mock : public LLDir +{ + void initAppDirs(const std::string &app_name, + const std::string& app_read_only_data_dir = "") {} + U32 countFilesInDir(const std::string &dirname, const std::string &mask) + { + return 0; + } + + BOOL getNextFileInDir(const std::string &dirname, + const std::string &mask, + std::string &fname, BOOL wrap) + { + return false; + } + void getRandomFileInDir(const std::string &dirname, + const std::string &mask, + std::string &fname) {} + std::string getCurPath() { return ""; } + BOOL fileExists(const std::string &filename) const { return false; } + std::string getLLPluginLauncher() { return ""; } + std::string getLLPluginFilename(std::string base_name) { return ""; } + +} gDirUtil; +LLDir* gDirUtilp = &gDirUtil; +LLDir::LLDir() {} +LLDir::~LLDir() {} +S32 LLDir::deleteFilesInDir(const std::string &dirname, + const std::string &mask) +{ return 0; } + +void LLDir::setChatLogsDir(const std::string &path){} +void LLDir::setPerAccountChatLogsDir(const std::string &username){} +void LLDir::setLindenUserDir(const std::string &username){} +void LLDir::setSkinFolder(const std::string &skin_folder){} +bool LLDir::setCacheDir(const std::string &path){ return true; } +void LLDir::dumpCurrentDirectories() {} + +std::string LLDir::getExpandedFilename(ELLPath location, + const std::string &filename) const +{ + return ""; +} + +std::string LLUpdateDownloader::downloadMarkerPath(void) +{ + return ""; +} + +void LLUpdateDownloader::resume(void) {} + +/* +#pragma warning(disable: 4273) +llus_mock_llifstream::llus_mock_llifstream(const std::string& _Filename, + ios_base::openmode _Mode, + int _Prot) : + std::basic_istream >(NULL,true) +{} + +llus_mock_llifstream::~llus_mock_llifstream() {} +bool llus_mock_llifstream::is_open() const {return true;} +void llus_mock_llifstream::close() {} +*/ + /***************************************************************************** * TUT *****************************************************************************/ @@ -96,9 +161,9 @@ namespace tut bool got_usage_error = false; try { - updater.setParams("1.0",test_url, "update" ,test_channel, test_version); + updater.initialize("1.0",test_url, "update" ,test_channel, test_version); updater.startChecking(); - updater.setParams("1.0", "other_url", "update", test_channel, test_version); + updater.initialize("1.0", "other_url", "update", test_channel, test_version); } catch(LLUpdaterService::UsageError) { @@ -112,7 +177,7 @@ namespace tut { DEBUG; LLUpdaterService updater; - updater.setParams("1.0", test_url, "update", test_channel, test_version); + updater.initialize("1.0", test_url, "update", test_channel, test_version); updater.startChecking(); ensure(updater.isChecking()); updater.stopChecking(); -- cgit v1.2.3 From 41517715844c986aab169502c94f39a9f507eb55 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 10 Nov 2010 19:21:03 -0800 Subject: CHOP-151 Hooked up app exit callback, cleaned up early exit. Rev. by Brad --- .../updater/tests/llupdaterservice_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 57732ad0a5..aa30fa717d 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -102,12 +102,12 @@ void LLUpdateDownloader::resume(void) {} /* #pragma warning(disable: 4273) -llus_mock_llifstream::llus_mock_llifstream(const std::string& _Filename, - ios_base::openmode _Mode, - int _Prot) : - std::basic_istream >(NULL,true) -{} - +llus_mock_llifstream::llus_mock_llifstream(const std::string& _Filename, + ios_base::openmode _Mode, + int _Prot) : + std::basic_istream >(NULL,true) +{} + llus_mock_llifstream::~llus_mock_llifstream() {} bool llus_mock_llifstream::is_open() const {return true;} void llus_mock_llifstream::close() {} -- cgit v1.2.3 From 6e15957d909787ba612004903f04335a593b5348 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 11 Nov 2010 09:40:30 -0800 Subject: run install script on successful download --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index aa30fa717d..9b56a04ff6 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -30,6 +30,7 @@ #include "../llupdaterservice.h" #include "../llupdatechecker.h" #include "../llupdatedownloader.h" +#include "../llupdateinstaller.h" #include "../../../test/lltut.h" //#define DEBUG_ON @@ -100,6 +101,11 @@ std::string LLUpdateDownloader::downloadMarkerPath(void) void LLUpdateDownloader::resume(void) {} +int ll_install_update(std::string const &, std::string const &, LLInstallScriptMode) +{ + return 0; +} + /* #pragma warning(disable: 4273) llus_mock_llifstream::llus_mock_llifstream(const std::string& _Filename, -- cgit v1.2.3 From ec7d36f6cfbed53a30d918415dfa3e429a645ce1 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Mon, 15 Nov 2010 09:38:20 -0800 Subject: added mechanism for install scripts to indicate a failed install and for update service to note the failure; modified mac installer to write marker on error. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 9b56a04ff6..25fd1b034d 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -106,6 +106,12 @@ int ll_install_update(std::string const &, std::string const &, LLInstallScriptM return 0; } +std::string const & ll_install_failed_marker_path() +{ + static std::string wubba; + return wubba; +} + /* #pragma warning(disable: 4273) llus_mock_llifstream::llus_mock_llifstream(const std::string& _Filename, -- cgit v1.2.3 From 0018762228c627b27ccc0d98528cfe745ca5d53e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 18 Nov 2010 12:12:44 -0500 Subject: Dummy out LLUpdateDownloader::cancel() too for testing. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 25fd1b034d..390879352c 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -100,6 +100,7 @@ std::string LLUpdateDownloader::downloadMarkerPath(void) } void LLUpdateDownloader::resume(void) {} +void LLUpdateDownloader::cancel(void) {} int ll_install_update(std::string const &, std::string const &, LLInstallScriptMode) { -- cgit v1.2.3 From c893c55d8a1328a134c956b70e6fef7fd7053d47 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 18 Nov 2010 17:03:01 -0800 Subject: Fixing bugs discovered in merge with viewer development --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 390879352c..04ed4e6364 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -61,7 +61,7 @@ class LLDir_Mock : public LLDir BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, - std::string &fname, BOOL wrap) + std::string &fname) { return false; } -- cgit v1.2.3 From 4d861ef022f6c22837de4c76ee3e7f2b191b8a5e Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 7 Dec 2010 14:32:37 -0800 Subject: push required flag into download data for later use. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 04ed4e6364..050bb774f7 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -48,7 +48,7 @@ void LLUpdateChecker::check(std::string const & protocolVersion, std::string con std::string const & servicePath, std::string channel, std::string version) {} LLUpdateDownloader::LLUpdateDownloader(Client & ) {} -void LLUpdateDownloader::download(LLURI const & , std::string const &){} +void LLUpdateDownloader::download(LLURI const & , std::string const &, bool){} class LLDir_Mock : public LLDir { -- cgit v1.2.3 From 3c3683b884542e5aa85099f4ce0c1b556613795d Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 7 Dec 2010 15:41:31 -0800 Subject: limit dowload bandwidth to 'Maximum bandwidth' setting --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 050bb774f7..fbdf9a4993 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -101,6 +101,7 @@ std::string LLUpdateDownloader::downloadMarkerPath(void) void LLUpdateDownloader::resume(void) {} void LLUpdateDownloader::cancel(void) {} +void LLUpdateDownloader::setBandwidthLimit(U64 bytesPerSecond) {} int ll_install_update(std::string const &, std::string const &, LLInstallScriptMode) { -- cgit v1.2.3 From 5b5d2c428c90b5172d53e1fbc3eb6e27daffddcb Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Tue, 14 Dec 2010 09:54:28 -0800 Subject: Record update version in download marker so it can be recalled if resumed in another viewer session. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index fbdf9a4993..be5a5da50d 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -48,7 +48,7 @@ void LLUpdateChecker::check(std::string const & protocolVersion, std::string con std::string const & servicePath, std::string channel, std::string version) {} LLUpdateDownloader::LLUpdateDownloader(Client & ) {} -void LLUpdateDownloader::download(LLURI const & , std::string const &, bool){} +void LLUpdateDownloader::download(LLURI const & , std::string const &, std::string const &, bool){} class LLDir_Mock : public LLDir { -- cgit v1.2.3 From 1774489ef8c224359e39d6281497e5128b043d24 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Thu, 16 Dec 2010 09:34:19 -0800 Subject: Vary install failed message depending on whether it was required or not. --- indra/viewer_components/updater/tests/llupdaterservice_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/updater/tests/llupdaterservice_test.cpp') diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index be5a5da50d..5f8cd28f29 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -103,7 +103,7 @@ void LLUpdateDownloader::resume(void) {} void LLUpdateDownloader::cancel(void) {} void LLUpdateDownloader::setBandwidthLimit(U64 bytesPerSecond) {} -int ll_install_update(std::string const &, std::string const &, LLInstallScriptMode) +int ll_install_update(std::string const &, std::string const &, bool, LLInstallScriptMode) { return 0; } -- cgit v1.2.3