mirror of
https://github.com/uutils/coreutils
synced 2024-11-15 09:27:21 +00:00
remaining-gnu-error.py: shows when a test requires root
This commit is contained in:
parent
8df064e1fa
commit
4a28b1674a
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue