remaining-gnu-error.py: shows when a test requires root

This commit is contained in:
Sylvestre Ledru 2024-01-02 20:33:05 +01:00
parent 8df064e1fa
commit 4a28b1674a

View file

@ -33,11 +33,22 @@ def show_list(l):
tests = list(filter(lambda k: "factor" not in k, l))
for f in reversed(tests):
print("%s: %s" % (f, os.stat(f).st_size))
if contains_require_root(f):
print("%s: %s / require_root" % (f, os.stat(f).st_size))
else:
print("%s: %s" % (f, os.stat(f).st_size))
print("")
print("%s tests remaining" % len(tests))
def contains_require_root(file_path):
try:
with open(file_path, "r") as file:
return "require_root_" in file.read()
except IOError:
return False
with open("result.json", "r") as json_file:
data = json.load(json_file)