forked from xerub/patchfinder64
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_versions.py
More file actions
22 lines (20 loc) · 827 Bytes
/
test_versions.py
File metadata and controls
22 lines (20 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os, subprocess
is_first = True
for subdir, dirs, files in os.walk("kernel_caches"):
for f in files:
if f.startswith("kernelcache_"):
if not is_first:
print("----------------")
is_first = False
version = f[len("kernelcache_"):]
out = subprocess.check_output([os.path.join(".", "bin", "patchfinder64"), os.path.join("kernel_caches", f)]).strip().split("\n")
fails = []
for test in out:
components = test.split(" - ")
if components[-1] == "FAIL":
fails.append(test)
if len(fails) > 0:
print("iOS {} - FAILED".format(version))
print("\n".join(fails))
else:
print("iOS {} - PASSED".format(version))