mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
remaining-gnu-error.py: simplify the code
This commit is contained in:
parent
97c6f6ac49
commit
465c1c1c9d
1 changed files with 5 additions and 9 deletions
|
@ -15,11 +15,11 @@ urllib.request.urlretrieve(
|
||||||
"result.json",
|
"result.json",
|
||||||
)
|
)
|
||||||
|
|
||||||
tests = glob.glob(base + "/*/*.sh")
|
types = ("/*/*.sh", "/*/*.pl", "/*/*.xpl")
|
||||||
tests_pl = glob.glob(base + "/*/*.pl")
|
|
||||||
tests_xpl = glob.glob(base + "/*/*.xpl")
|
|
||||||
tests = tests + tests_pl + tests_xpl
|
|
||||||
|
|
||||||
|
tests = []
|
||||||
|
for files in types:
|
||||||
|
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)
|
||||||
|
|
||||||
|
@ -38,11 +38,7 @@ for d in data:
|
||||||
|
|
||||||
# the tests pass, we don't care anymore
|
# the tests pass, we don't care anymore
|
||||||
if data[d][e] == "PASS":
|
if data[d][e] == "PASS":
|
||||||
try:
|
|
||||||
list_of_files.remove(a)
|
list_of_files.remove(a)
|
||||||
except ValueError:
|
|
||||||
# Ignore the error
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Remove the factor tests and reverse the list (bigger first)
|
# Remove the factor tests and reverse the list (bigger first)
|
||||||
tests = list(filter(lambda k: "factor" not in k, list_of_files))
|
tests = list(filter(lambda k: "factor" not in k, list_of_files))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue