Merge pull request #5773 from sylvestre/require_root

remaining-gnu-error.py: shows when a test requires root
This commit is contained in:
Daniel Hofstetter 2024-01-03 08:02:54 +01:00 committed by GitHub
commit 38282b4df2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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):
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)