When running gyp_to_android inside a Skia tree, it uses the gyp program
in third_party/externals. Inside an Android tree, we need to use a
different location for gyp (the Android copy of Skia, in external/skia,
does not contain third_party/externals).
The bot handles this by importing gyp_to_android and running its main
function directly.
Add command line arguments so a human can directly run gyp_to_android.
Review URL: https://codereview.chromium.org/
864503002
files.
"""
+import argparse
import os
import shutil
import sys
shutil.rmtree(tmp_folder)
if __name__ == '__main__':
- main()
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--gyp_source_dir', help='Source of gyp program. '
+ 'e.g. <path_to_skia>/third_party/externals/gyp')
+ args = parser.parse_args()
+
+ main(gyp_source_dir=args.gyp_source_dir)