blob: 9b6ed7639f189f013f1a46b1292bcb60bf79b844 [file] [log] [blame]
#!/usr/bin/env fuchsia-vendored-python
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Assert that drivers aren't included in the build without a driver component"""
import json
import argparse
def main():
parser = argparse.ArgumentParser(description=__doc__)
type=argparse.FileType("r", encoding="UTF-8"),
help="Path to the metadata file which tried to collect data about drivers",
type=argparse.FileType("w", encoding="UTF-8"),
help="The path for the output file for the build.",
args = parser.parse_args()
lines = args.metadata_file.readlines()
if len(lines) != 0:
print("All drivers should have driver components. These do not:")
for line in lines:
print(" " + line, end="")
"Please visit for how drivers should be included."
raise Exception("Found drivers that weren't driver components")
if __name__ == "__main__":