mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +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))
|
tests = list(filter(lambda k: "factor" not in k, l))
|
||||||
|
|
||||||
for f in reversed(tests):
|
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("")
|
||||||
print("%s tests remaining" % len(tests))
|
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:
|
with open("result.json", "r") as json_file:
|
||||||
data = json.load(json_file)
|
data = json.load(json_file)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue