blob: 50236fb92f00b17a37781c6976bb359691439e48 [file] [log] [blame]
#!/usr/bin/env fuchsia-vendored-python
# Copyright 2018 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.
import argparse
import os
import subprocess
import sys
import pipes
def main():
parser = argparse.ArgumentParser("Generate vulkan cts dep file")
parser.add_argument("depsfile")
parser.add_argument("input_dir")
args = parser.parse_args()
files = subprocess.check_output([
"find", args.input_dir, "-path", "*/.git", "-prune", "-o", "-type", "f",
"-print"
])
file_lines = files.splitlines()
with open(args.depsfile, "wb") as depsfile:
depsfile.write(("build-vulkancts/external/vulkancts/modules/vulkan/deqp-vk: ").encode("utf-8"))
depsfile.write(b" ".join(x.replace(b' ', b'\\ ') for x in file_lines))
return 0
if __name__ == "__main__":
sys.exit(main())