]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tests: py: disable main_signon check for printenv cmd
authorHeiko Schocher <hs@denx.de>
Tue, 7 Jun 2016 06:31:15 +0000 (08:31 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 9 Jun 2016 17:53:05 +0000 (13:53 -0400)
if CONFIG_VERSION_VARIABLE is set, the U-Boot environment
contains a "vers" variable with the current U-Boot version
string. If now "printenv" is called, test/py fails as it
detects the main_sign string, which is in this case correct.

So check only the main_sign as an error, if CONFIG_VERSION_VARIABLE
is not set.

Signed-off-by: Heiko Schocher <hs@denx.de>
test/py/tests/test_env.py

index c41aa5a9d9c7a40d958eef2fedaab0c015b9baba..22a22d1d538b4f0715a025e9ed224f8f3870ce00 100644 (file)
@@ -39,7 +39,11 @@ class StateTestEnv(object):
             Nothing.
         """
 
-        response = self.u_boot_console.run_command('printenv')
+        if self.u_boot_console.config.buildconfig['config_version_variable'] == 'y':
+            with self.u_boot_console.disable_check('main_signon'):
+                response = self.u_boot_console.run_command('printenv')
+        else:
+            response = self.u_boot_console.run_command('printenv')
         self.env = {}
         for l in response.splitlines():
             if not '=' in l: