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

Side by Side Diff: platform_tools/android/bin/gyp_to_android.py

Issue 142173002: Add self tests for gyp_to_android. (Closed) Base URL: https://skia.googlesource.com/skia.git@GYP2
Patch Set: Created 6 years, 11 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 | tools/tests/gyp_to_android_tests.py » ('j') | tools/tests/gyp_to_android_tests.py » ('J')
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 Script for generating the Android framework's verision of Skia from gyp 9 Script for generating the Android framework's verision of Skia from gyp
10 files. 10 files.
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 Remove the gypd files generated by android_framework_gyp.main(). 345 Remove the gypd files generated by android_framework_gyp.main().
346 """ 346 """
347 assert os.path.isdir(GYP_FOLDER) 347 assert os.path.isdir(GYP_FOLDER)
348 files = os.listdir(GYP_FOLDER) 348 files = os.listdir(GYP_FOLDER)
349 for f in files: 349 for f in files:
350 if f.endswith('gypd'): 350 if f.endswith('gypd'):
351 os.remove(os.path.join(GYP_FOLDER, f)) 351 os.remove(os.path.join(GYP_FOLDER, f))
352 352
353 import android_framework_gyp 353 import android_framework_gyp
354 354
355 def main(): 355 def main():
epoger 2014/01/21 20:00:51 Please add docstring describing meaning of return
scroggo 2014/01/22 16:36:48 Return value removed, but doc string added.
356 # Move up to top of trunk 356 # Move up to top of trunk
357 script_dir = os.path.dirname(__file__) 357 script_dir = os.path.dirname(__file__)
358 skia_dir = os.path.normpath(os.path.join(script_dir, os.pardir, os.pardir, 358 skia_dir = os.path.normpath(os.path.join(script_dir, os.pardir, os.pardir,
359 os.pardir)) 359 os.pardir))
360 os.chdir(skia_dir) 360 os.chdir(skia_dir)
361 361
362 main_gypd_file = os.path.join(GYP_FOLDER, 'android_framework_lib.gypd') 362 main_gypd_file = os.path.join(GYP_FOLDER, 'android_framework_lib.gypd')
363 363
364 print 'Creating Android.mk', 364 print 'Creating Android.mk',
365 365
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 common = Intersect(var_dict_list) 406 common = Intersect(var_dict_list)
407 407
408 # Further trim arm_neon_var_dict with arm_var_dict. After this call, 408 # Further trim arm_neon_var_dict with arm_var_dict. After this call,
409 # arm_var_dict (which will now be the intersection) includes all definitions 409 # arm_var_dict (which will now be the intersection) includes all definitions
410 # used by both arm and arm + neon, and arm_neon_var_dict will only contain 410 # used by both arm and arm + neon, and arm_neon_var_dict will only contain
411 # those specific to arm + neon. 411 # those specific to arm + neon.
412 arm_var_dict = Intersect([arm_var_dict, arm_neon_var_dict]) 412 arm_var_dict = Intersect([arm_var_dict, arm_neon_var_dict])
413 413
414 WriteAndroidMk(common, arm_var_dict, arm_neon_var_dict, x86_var_dict, 414 WriteAndroidMk(common, arm_var_dict, arm_neon_var_dict, x86_var_dict,
415 default_var_dict) 415 default_var_dict)
416 return 0
epoger 2014/01/21 20:00:51 How would main() ever return anything but 0?
scroggo 2014/01/22 16:36:48 It would not. Removed.
scroggo 2014/01/22 19:32:50 D'oh! I thought I removed it. Removed in next patc
416 417
417 if __name__ == '__main__': 418 if __name__ == '__main__':
418 main() 419 main()
OLDNEW
« no previous file with comments | « no previous file | tools/tests/gyp_to_android_tests.py » ('j') | tools/tests/gyp_to_android_tests.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698