diff --git a/util/remaining-gnu-error.py b/util/remaining-gnu-error.py index 5fd47300a..7bd9b141a 100755 --- a/util/remaining-gnu-error.py +++ b/util/remaining-gnu-error.py @@ -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)