From de24a9555e6a1a13b4b16f86c7a475cb2aafde9b Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Tue, 30 Oct 2018 13:38:00 +0100 Subject: [PATCH] Fix Ice Tea test execution order to be sorted by names. --- tools/run_icetea.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/run_icetea.py b/tools/run_icetea.py index 80eb9caef0..0af90d7b26 100644 --- a/tools/run_icetea.py +++ b/tools/run_icetea.py @@ -19,7 +19,7 @@ import sys import os import re from os.path import abspath, join, dirname, relpath, sep -import json +import json, operator import traceback from fnmatch import translate from argparse import ArgumentParser @@ -173,13 +173,16 @@ def icetea_tests(target, tcdir, verbose): + (['-v'] if verbose else []) stdout, stderr, returncode = run_cmd(command) - + + list_json = json.loads(stdout) + list_json.sort(key=operator.itemgetter('name')) + if returncode != 0: additional_information = "\ncwd:{} \nCommand:'{}' \noutput:{}".format(os.getcwd(), ' '.join(command), stderr.decode()) raise Exception("Error when running icetea. {}".format(additional_information)) - return json.loads(stdout) + return list_json def is_test_in_test_by_name(test_name, test_by_name):