mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
gn_helper: find correct directory for //
gn finds // by searching .gn in parent directories. To support out dir is not 2 directories from root (i.e. out/Default), search .gn in parent directory for '//' location. tools/licenses/licenses.py runs 'gn gen' in out/Default/$tmp. for such case, '//' should be '../../..', or fail to import '//path' Change-Id: I6e5ccbe93cb5e51704f31d4eb558c03560286865 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6051636 Reviewed-by: Philipp Wollermann <philwo@google.com> Commit-Queue: Fumitoshi Ukai <ukai@google.com> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
This commit is contained in:
@@ -36,6 +36,7 @@ class GnHelperTest(trial_dir.TestCase):
|
||||
super().tearDown()
|
||||
|
||||
def test_lines(self):
|
||||
write('.gn', '')
|
||||
out_dir = os.path.join('out', 'dir')
|
||||
# Make sure nested import directives work. This is based on the
|
||||
# reclient test.
|
||||
@@ -52,6 +53,7 @@ class GnHelperTest(trial_dir.TestCase):
|
||||
])
|
||||
|
||||
def test_args(self):
|
||||
write('.gn', '')
|
||||
out_dir = os.path.join('out', 'dir')
|
||||
# Make sure nested import directives work. This is based on the
|
||||
# reclient test.
|
||||
@@ -68,6 +70,7 @@ class GnHelperTest(trial_dir.TestCase):
|
||||
])
|
||||
|
||||
def test_args_spaces(self):
|
||||
write('.gn', '')
|
||||
out_dir = os.path.join('out', 'dir')
|
||||
# Make sure nested import directives work. This is based on the
|
||||
# reclient test.
|
||||
|
||||
Reference in New Issue
Block a user