mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
Merge pull request #5773 from sylvestre/require_root
remaining-gnu-error.py: shows when a test requires root
This commit is contained in:
commit
38282b4df2
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):
|
||||
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