Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: build/android/pylib/utils/isolator.py

Issue 1401893003: Fix Android unit tests failing when using a GN output directory of foo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import fnmatch 5 import fnmatch
6 import glob 6 import glob
7 import os 7 import os
8 import shutil 8 import shutil
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 Moves pak files from the output directory to to <isolate_deps_dir>/paks 152 Moves pak files from the output directory to to <isolate_deps_dir>/paks
153 Moves files from the product directory to <isolate_deps_dir> 153 Moves files from the product directory to <isolate_deps_dir>
154 """ 154 """
155 # On Android, all pak files need to be in the top-level 'paks' directory. 155 # On Android, all pak files need to be in the top-level 'paks' directory.
156 paks_dir = os.path.join(self._isolate_deps_dir, 'paks') 156 paks_dir = os.path.join(self._isolate_deps_dir, 'paks')
157 os.mkdir(paks_dir) 157 os.mkdir(paks_dir)
158 158
159 deps_out_dir = os.path.join( 159 deps_out_dir = os.path.join(
160 self._isolate_deps_dir, 160 self._isolate_deps_dir,
161 os.path.relpath(os.path.join(constants.GetOutDirectory(), os.pardir), 161 os.path.relpath(constants.GetOutDirectory(), constants.DIR_SOURCE_ROOT))
jbudorick 2015/10/14 17:56:30 Yeah, this will definitely break our GYP builds at
162 constants.DIR_SOURCE_ROOT))
163 for root, _, filenames in os.walk(deps_out_dir): 162 for root, _, filenames in os.walk(deps_out_dir):
164 for filename in fnmatch.filter(filenames, '*.pak'): 163 for filename in fnmatch.filter(filenames, '*.pak'):
165 shutil.move(os.path.join(root, filename), paks_dir) 164 shutil.move(os.path.join(root, filename), paks_dir)
166 165
167 # Move everything in PRODUCT_DIR to top level. 166 # Move everything in PRODUCT_DIR to top level.
168 deps_product_dir = os.path.join(deps_out_dir, constants.GetBuildType()) 167 deps_product_dir = os.path.join(deps_out_dir, constants.GetBuildType())
169 if os.path.isdir(deps_product_dir): 168 if os.path.isdir(deps_product_dir):
170 for p in os.listdir(deps_product_dir): 169 for p in os.listdir(deps_product_dir):
171 shutil.move(os.path.join(deps_product_dir, p), self._isolate_deps_dir) 170 shutil.move(os.path.join(deps_product_dir, p), self._isolate_deps_dir)
172 os.rmdir(deps_product_dir) 171 os.rmdir(deps_product_dir)
173 os.rmdir(deps_out_dir) 172 os.rmdir(deps_out_dir)
174 173
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698