mirror of
https://github.com/uutils/coreutils
synced 2025-01-05 17:59:00 +00:00
remaining-gnu-error.py: separate FAIL from ERROR/SKIP
This commit is contained in:
parent
56c8ab8b17
commit
2870fb091b
1 changed files with 23 additions and 5 deletions
|
@ -18,11 +18,24 @@ urllib.request.urlretrieve(
|
||||||
types = ("/*/*.sh", "/*/*.pl", "/*/*.xpl")
|
types = ("/*/*.sh", "/*/*.pl", "/*/*.xpl")
|
||||||
|
|
||||||
tests = []
|
tests = []
|
||||||
|
error_or_skip_tests = []
|
||||||
|
|
||||||
for files in types:
|
for files in types:
|
||||||
tests.extend(glob.glob(base + files))
|
tests.extend(glob.glob(base + files))
|
||||||
# sort by size
|
# sort by size
|
||||||
list_of_files = sorted(tests, key=lambda x: os.stat(x).st_size)
|
list_of_files = sorted(tests, key=lambda x: os.stat(x).st_size)
|
||||||
|
|
||||||
|
|
||||||
|
def show_list(l):
|
||||||
|
# Remove the factor tests and reverse the list (bigger first)
|
||||||
|
tests = list(filter(lambda k: "factor" not in k, l))
|
||||||
|
|
||||||
|
for f in reversed(tests):
|
||||||
|
print("%s: %s" % (f, os.stat(f).st_size))
|
||||||
|
print("")
|
||||||
|
print("%s tests remaining" % len(tests))
|
||||||
|
|
||||||
|
|
||||||
with open("result.json", "r") as json_file:
|
with open("result.json", "r") as json_file:
|
||||||
data = json.load(json_file)
|
data = json.load(json_file)
|
||||||
|
|
||||||
|
@ -40,10 +53,15 @@ for d in data:
|
||||||
if data[d][e] == "PASS":
|
if data[d][e] == "PASS":
|
||||||
list_of_files.remove(a)
|
list_of_files.remove(a)
|
||||||
|
|
||||||
# Remove the factor tests and reverse the list (bigger first)
|
# if it is SKIP or ERROR, show it
|
||||||
tests = list(filter(lambda k: "factor" not in k, list_of_files))
|
if data[d][e] == "SKIP" or data[d][e] == "ERROR":
|
||||||
|
list_of_files.remove(a)
|
||||||
|
error_or_skip_tests.append(a)
|
||||||
|
|
||||||
for f in reversed(tests):
|
|
||||||
print("%s: %s" % (f, os.stat(f).st_size))
|
print("SKIP and ERROR tests:")
|
||||||
|
show_list(error_or_skip_tests)
|
||||||
print("")
|
print("")
|
||||||
print("%s tests remaining" % len(tests))
|
print("===============")
|
||||||
|
print("FAIL tests:")
|
||||||
|
show_list(list_of_files)
|
||||||
|
|
Loading…
Reference in a new issue