blob: 19b275dbdc183d225f0e0df1842da2c9cc69712d [file] [log] [blame]
#!/usr/bin/env python
# Copyright (c) 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generates the directory->tags mapping used by ResultDB."""
# pylint: disable=line-too-long
# For more on the tags, see
# pylint: enable=line-too-long
import argparse
import os
import subprocess
import sys
THIS_DIR = os.path.dirname(__file__)
SRC_DIR = os.path.dirname(THIS_DIR)
BUILD_DIR = os.path.join(SRC_DIR, 'build')
sys.path.insert(0, BUILD_DIR)
import find_depot_tools
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-o', '--out', required=True,
help='path to write location tag metadata to')
args = parser.parse_args()
exe = os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'dirmd')
if sys.platform == 'win32':
exe = exe + '.bat'
'-out', args.out,
'-root', SRC_DIR,
'-repo', '',
if __name__ == '__main__':