
The methodology used to generate this CL is documented in https://crbug.com/1098010#c95. No-Try: true No-Presubmit: true Bug: 1098010 Change-Id: I3a8a7b150e7bd64690534727150646081df50439 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697 Reviewed-by: Mark Mentovai <mark@chromium.org> Auto-Submit: Avi Drissman <avi@chromium.org> Owners-Override: Avi Drissman <avi@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1047644}
15 lines
503 B
Python
15 lines
503 B
Python
# Copyright 2015 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Utility functions for resolving file paths in histograms scripts."""
|
|
|
|
import os.path
|
|
|
|
|
|
def GetInputFile(src_relative_file_path):
|
|
"""Converts a src/-relative file path into a path that can be opened."""
|
|
depth = [os.path.dirname(__file__), '..', '..', '..']
|
|
path = os.path.join(*(depth + src_relative_file_path.split('/')))
|
|
return os.path.abspath(path)
|