diff options
author | Kevin Rocard <kevinx.rocard@intel.com> | 2012-12-11 16:19:17 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:31 +0100 |
commit | ace81f873b910493ab884dc5a6a38ba6ec3d56d3 (patch) | |
tree | 0835bb56ade03f1bd98834f1aaf1abeca3c00459 /test | |
parent | 57096bd2de45c840090503d70f40b79565e38881 (diff) | |
download | external_parameter-framework-ace81f873b910493ab884dc5a6a38ba6ec3d56d3.zip external_parameter-framework-ace81f873b910493ab884dc5a6a38ba6ec3d56d3.tar.gz external_parameter-framework-ace81f873b910493ab884dc5a6a38ba6ec3d56d3.tar.bz2 |
PFW: Do not stop on hard sync errors
BZ: 76263
When synchronization fails, the parameter-framework should
log a warning and continue synchronization instead of stopping
Change-Id: Ic12d8798ea25584db714ee26e644fac793c28881
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Reviewed-on: http://android.intel.com:8080/81825
Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com>
Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com>
Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-platform/TestPlatform.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/test/test-platform/TestPlatform.cpp b/test/test-platform/TestPlatform.cpp index af741ed..60ee644 100644 --- a/test/test-platform/TestPlatform.cpp +++ b/test/test-platform/TestPlatform.cpp @@ -27,19 +27,25 @@ #include <stdlib.h> #include <sstream> #include <assert.h> +#include <errno.h> #include "TestPlatform.h" #include "ParameterMgrPlatformConnector.h" #include "RemoteProcessorServer.h" -#include <errno.h> class CParameterMgrPlatformConnectorLogger : public CParameterMgrPlatformConnector::ILogger { public: CParameterMgrPlatformConnectorLogger() {} - virtual void log(const string& strLog) { + virtual void log(bool bIsWarning, const string& strLog) { + + if (bIsWarning) { - cout << strLog << endl; + cerr << strLog << endl; + } else { + + cout << strLog << endl; + } } }; @@ -92,29 +98,34 @@ bool CTestPlatform::load(std::string& strError) /// Selection Criterion CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::createExclusiveSelectionCriterionFromStateListCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { - return createExclusiveSelectionCriterionFromStateList(remoteCommand.getArgument(0), remoteCommand, strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + return createExclusiveSelectionCriterionFromStateList(remoteCommand.getArgument(0), remoteCommand, strResult) ? + CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; } CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::createInclusiveSelectionCriterionFromStateListCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { - return createInclusiveSelectionCriterionFromStateList(remoteCommand.getArgument(0), remoteCommand, strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + return createInclusiveSelectionCriterionFromStateList(remoteCommand.getArgument(0), remoteCommand, strResult) ? + CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; } CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::createExclusiveSelectionCriterionCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { - return createExclusiveSelectionCriterion(remoteCommand.getArgument(0), strtoul(remoteCommand.getArgument(1).c_str(), NULL, 0), strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + return createExclusiveSelectionCriterion(remoteCommand.getArgument(0), strtoul(remoteCommand.getArgument(1).c_str(), NULL, 0), strResult) ? + CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; } CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::createInclusiveSelectionCriterionCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { - return createInclusiveSelectionCriterion(remoteCommand.getArgument(0), strtoul(remoteCommand.getArgument(1).c_str(), NULL, 0), strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + return createInclusiveSelectionCriterion(remoteCommand.getArgument(0), strtoul(remoteCommand.getArgument(1).c_str(), NULL, 0), strResult) ? + CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; } - CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::startParameterMgrCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { (void)remoteCommand; - return _pParameterMgrPlatformConnector->start(strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + + return _pParameterMgrPlatformConnector->start(strResult) ? + CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; } CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::setCriterionStateCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) @@ -147,7 +158,11 @@ CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::setCriterionStateCo CTestPlatform::CCommandHandler::CommandStatus CTestPlatform::applyConfigurationsCommandProcess(const IRemoteCommand& remoteCommand, string& strResult) { (void)remoteCommand; - return _pParameterMgrPlatformConnector->applyConfigurations(strResult) ? CTestPlatform::CCommandHandler::EDone : CTestPlatform::CCommandHandler::EFailed; + (void)strResult; + + _pParameterMgrPlatformConnector->applyConfigurations(); + + return CTestPlatform::CCommandHandler::EDone; } //////////////// Remote command handlers |