Merge pull request #8588 from mprse/ice_tea_test_order_fix

Fix Ice Tea test execution order to be sorted by names.
pull/8622/head
Cruz Monrreal 2018-11-01 09:55:29 -05:00 committed by GitHub
commit 274f8b92d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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):