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

Side by Side Diff: platform_tools/android/gyp_gen/makefile_writer.py

Issue 205383006: Add tests for makefile_writer.py. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Check test results to return non zero on failure. Created 6 years, 8 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 | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2014 Google Inc. 3 # Copyright 2014 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 """ 8 """
9 Functions for creating an Android.mk from already created dictionaries. 9 Functions for creating an Android.mk from already created dictionaries.
10 """ 10 """
11 11
12 import os 12 import os
13 13
14 # TODO(scroggo): Add unit tests for this file.
15 def write_group(f, name, items, append): 14 def write_group(f, name, items, append):
16 """ 15 """
17 Helper function to list all names passed to a variable. 16 Helper function to list all names passed to a variable.
18 @param f File open for writing (Android.mk) 17 @param f File open for writing (Android.mk)
19 @param name Name of the makefile variable (e.g. LOCAL_CFLAGS) 18 @param name Name of the makefile variable (e.g. LOCAL_CFLAGS)
20 @param items list of strings to be passed to the variable. 19 @param items list of strings to be passed to the variable.
21 @param append Whether to append to the variable or overwrite it. 20 @param append Whether to append to the variable or overwrite it.
22 """ 21 """
23 if not items: 22 if not items:
24 return 23 return
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 f.write('ifeq ($(%s), true)\n' % data.condition) 193 f.write('ifeq ($(%s), true)\n' % data.condition)
195 write_local_vars(f, data.vars_dict, True, data.name) 194 write_local_vars(f, data.vars_dict, True, data.name)
196 if data.condition: 195 if data.condition:
197 f.write('endif\n\n') 196 f.write('endif\n\n')
198 197
199 f.write('include external/stlport/libstlport.mk\n') 198 f.write('include external/stlport/libstlport.mk\n')
200 f.write('LOCAL_MODULE:= libskia\n') 199 f.write('LOCAL_MODULE:= libskia\n')
201 f.write('include $(BUILD_SHARED_LIBRARY)\n') 200 f.write('include $(BUILD_SHARED_LIBRARY)\n')
202 f.write(SKIA_TOOLS) 201 f.write(SKIA_TOOLS)
203 202
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698