From 1e5fba51f022a9320e72b6df753a02bfc1732af8 Mon Sep 17 00:00:00 2001 From: Yeoh Ee Peng Date: Thu, 4 Apr 2019 16:48:37 +0800 Subject: 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 Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- 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 07835407d5..9a29b0b273 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: -- cgit 1.2.3-korg