18SRC_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
22 parser = argparse.ArgumentParser(
23 description=
'A script that tests the impeller-cmake-example build.',
30 help=
'Run cmake for impeller-cmake-example.',
36 help=
'The path to the impeller-cmake-example source.',
43 help=
'Clone the git submodules.',
50 help=
'Emit verbose output.',
56 help=
'Symlink the Xcode sysroot to help Goma be successful.',
58 return parser.parse_args(argv)
62 if not os.path.isdir(os.path.join(SRC_ROOT, args.path)):
64 'The --path argument must be a valid directory relative to the '
65 'engine src/ directory.'
75 os.path.join(SRC_ROOT,
'build',
'mac',
'find_sdk.py'),
79 os.path.join(SRC_ROOT,
'out',
'impeller-cmake-example-xcode-sysroot'),
81 find_sdk_output = subprocess.check_output(find_sdk_command).
decode(
'utf-8')
82 return find_sdk_output.split(
'\n')[0]
90 impeller_cmake_dir = os.path.join(SRC_ROOT, args.path)
106 subprocess.check_call(git_command)
109 subprocess.check_call([
'bash',
'deps.sh'], cwd=impeller_cmake_dir)
113 cmake_path = os.path.join(SRC_ROOT,
'buildtools',
'mac-x64',
'cmake',
'bin',
'cmake')
117 'flutter-ci-mac-debug-x64',
119 os.path.join(SRC_ROOT,
'out',
'impeller-cmake-example'),
121 cmake_env = os.environ.copy()
122 ninja_path = os.path.join(SRC_ROOT,
'flutter',
'third_party',
'ninja')
124 'PATH': os.environ[
'PATH'] +
':' + ninja_path,
125 'FLUTTER_ENGINE_SRC_DIR': SRC_ROOT,
127 if args.xcode_symlinks:
130 'FLUTTER_OSX_SYSROOT': xcode_symlink_path,
132 subprocess.check_call(cmake_command, env=cmake_env, cwd=impeller_cmake_dir)
137if __name__ ==
'__main__':
138 sys.exit(
main(sys.argv))
def create_xcode_symlink()
def print(*args, **kwargs)
static DecodeResult decode(std::string path)