瀏覽代碼

tests: py: disable main_signon check for printenv cmd

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>
Heiko Schocher 8 年之前
父節點
當前提交
da37f006e7
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      test/py/tests/test_env.py

+ 5 - 1
test/py/tests/test_env.py

@@ -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: