diff options
author | Jules Clero <julesx.clero@intel.com> | 2015-02-11 09:38:07 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-24 13:39:12 -0700 |
commit | d770f7a4082873887833d886fb8aeacf1eeb57af (patch) | |
tree | cf6cef3af0c2f5105a3487b78fa4a0290df3be33 /test | |
parent | b779e16d893bebfea8d5f37d0dbb5c36d95a1c91 (diff) | |
download | external_parameter-framework-d770f7a4082873887833d886fb8aeacf1eeb57af.zip external_parameter-framework-d770f7a4082873887833d886fb8aeacf1eeb57af.tar.gz external_parameter-framework-d770f7a4082873887833d886fb8aeacf1eeb57af.tar.bz2 |
Fix tSTRING_128 parenthesis error
This test was trying to set string parameter containing
parenthesis through remote-process without escaped them.
This patch introduces the escaped value in order to
correctly use the remote-process command through bash.
Signed-off-by: Jules Clero <julesx.clero@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/functional-tests/PfwTestCase/Types/tSTRING_128.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional-tests/PfwTestCase/Types/tSTRING_128.py b/test/functional-tests/PfwTestCase/Types/tSTRING_128.py index 6ef1876..0ed6e85 100644 --- a/test/functional-tests/PfwTestCase/Types/tSTRING_128.py +++ b/test/functional-tests/PfwTestCase/Types/tSTRING_128.py @@ -229,8 +229,12 @@ class TestCases(PfwTestCase): log.I("STR_CHAR128 parameter Parenthese Char = %s" % (value)) param_check = commands.getoutput('cat $PFW_FILESYSTEM/STR_CHAR128') #Set parameter value - out, err = self.pfw.sendCmd("setParameter", self.param_name, value) + out, err = self.pfw.sendCmd("setParameter", self.param_name, "'%s'" % (value)) assert err == None, log.E("When setting parameter %s : %s" % (self.param_name, err)) + assert out == "Done", log.F("Expected : Done, found : %s" % (out)) + #Get parameter value + out, err = self.pfw.sendCmd("getParameter", self.param_name) + assert err == None, log.E("When getting parameter %s : %s" % (self.param_name, err)) assert out == value, log.F("BLACKBOARD : Incorrect value for %s, expected: %s, found: %s" % (self.param_name, value, out)) #Check parameter value on filesystem assert commands.getoutput('cat $PFW_FILESYSTEM/STR_CHAR128') == value, log.F("FILESYSTEM : parameter update error") @@ -254,8 +258,12 @@ class TestCases(PfwTestCase): log.I("STR_CHAR128 parameter Parenthese Char = %s" % (value)) param_check = commands.getoutput('cat $PFW_FILESYSTEM/STR_CHAR128') #Set parameter value - out, err = self.pfw.sendCmd("setParameter", self.param_name, value) + out, err = self.pfw.sendCmd("setParameter", self.param_name, "'%s'" % value) assert err == None, log.E("When setting parameter %s : %s" % (self.param_name, err)) + assert out == "Done", log.F("Expected : Done, found : %s" % (out)) + #Get parameter value + out, err = self.pfw.sendCmd("getParameter", self.param_name) + assert err == None, log.E("When getting parameter %s : %s" % (self.param_name, err)) assert out == value, log.F("BLACKBOARD : Incorrect value for %s, expected: %s, found: %s" % (self.param_name, value, out)) #Check parameter value on filesystem assert commands.getoutput('cat $PFW_FILESYSTEM/STR_CHAR128') == value, log.F("FILESYSTEM : parameter update error") |