[oe-commits] [openembedded-core] 14/16: resulttool/manualexecution: Fixed step sorted by integer

git at git.openembedded.org git at git.openembedded.org
Tue Apr 9 21:17:16 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit 2d96a9228fb451752c061c25582a5cc1735099bf
Author: Yeoh Ee Peng <ee.peng.yeoh at intel.com>
AuthorDate: Thu Apr 4 16:48:37 2019 +0800

    resulttool/manualexecution: Fixed step sorted by integer
    
    Currently the manual execution display step by sorting
    the step as string, where steps were not being sorted
    correctly when there are more than 9 steps.
    
    Fixed the step sorting by sorting step as integer.
    
    Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/lib/resulttool/manualexecution.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py
index 0783540..9a29b0b 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -85,7 +85,7 @@ class ManualTestRunner(object):
         print('------------------------------------------------------------------------')
         print('You have total ' + str(total_steps) + ' test steps to be executed.')
         print('------------------------------------------------------------------------\n')
-        for step in sorted((self.jdata[test_id]['test']['execution']).keys()):
+        for step, _ in sorted(self.jdata[test_id]['test']['execution'].items(), key=lambda x: int(x[0])):
             print('Step %s: ' % step + self.jdata[test_id]['test']['execution']['%s' % step]['action'])
             expected_output = self.jdata[test_id]['test']['execution']['%s' % step]['expected_results']
             if expected_output:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list