import os
import KernelCollection
def check(kernel_cache):
kernel_cache.buildKernelCollection("arm64", "/kext-bind-missing-dep/main.kc", "/kext-bind-missing-dep/main.kernel", "/kext-bind-missing-dep/extensions", ["com.apple.foo"], ["-json-errors"])
assert len(kernel_cache.dictionary()) == 1
assert kernel_cache.dictionary()[0]["id"] == "com.apple.foo"
assert len(kernel_cache.dictionary()[0]["errors"]) == 1
assert kernel_cache.dictionary()[0]["errors"][0] == "Failed to bind '_bar' as could not find a kext with 'com.apple.bar' bundle-id"