Fix Ice Tea test execution order to be sorted by names.

pull/8588/head
Przemyslaw Stekiel 2018-10-30 13:38:00 +01:00
parent 27c0affef7
commit de24a9555e
1 changed files with 6 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import sys
import os import os
import re import re
from os.path import abspath, join, dirname, relpath, sep from os.path import abspath, join, dirname, relpath, sep
import json import json, operator
import traceback import traceback
from fnmatch import translate from fnmatch import translate
from argparse import ArgumentParser from argparse import ArgumentParser
@ -173,13 +173,16 @@ def icetea_tests(target, tcdir, verbose):
+ (['-v'] if verbose else []) + (['-v'] if verbose else [])
stdout, stderr, returncode = run_cmd(command) stdout, stderr, returncode = run_cmd(command)
list_json = json.loads(stdout)
list_json.sort(key=operator.itemgetter('name'))
if returncode != 0: if returncode != 0:
additional_information = "\ncwd:{} \nCommand:'{}' \noutput:{}".format(os.getcwd(), ' '.join(command), additional_information = "\ncwd:{} \nCommand:'{}' \noutput:{}".format(os.getcwd(), ' '.join(command),
stderr.decode()) stderr.decode())
raise Exception("Error when running icetea. {}".format(additional_information)) 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): def is_test_in_test_by_name(test_name, test_by_name):