blob: f63c673893889e773a79a2272475c37ce4463e5c [file] [log] [blame]
Søren Gjesse6d9e1552017-09-13 12:41:45 +02001#!/usr/bin/env python
2# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
Søren Gjesse6d9e1552017-09-13 12:41:45 +02006import argparse
Søren Gjesse6d9e1552017-09-13 12:41:45 +02007import sys
8
9import utils
Søren Gjesse3330db22017-09-13 13:53:11 +020010import utils_aosp
Søren Gjesse6d9e1552017-09-13 12:41:45 +020011
12def parse_arguments():
13 parser = argparse.ArgumentParser(
14 description = 'Checkout the AOSP source tree.')
Søren Gjesse3330db22017-09-13 13:53:11 +020015 utils_aosp.add_common_arguments(parser)
Søren Gjesse6d9e1552017-09-13 12:41:45 +020016 return parser.parse_args()
17
18def emulator_aosp(aosp_root, lunch):
Søren Gjesse3330db22017-09-13 13:53:11 +020019 print "Running AOSP emulator in " + aosp_root
20
21 utils_aosp.run_through_aosp_helper(lunch, ['emulator_fg',
22 '-partition-size', '4096', '-wipe-data'], cwd = aosp_root)
Søren Gjesse6d9e1552017-09-13 12:41:45 +020023
24def Main():
25 args = parse_arguments()
26
27 emulator_aosp(args.aosp_root, args.lunch)
28
29if __name__ == '__main__':
30 sys.exit(Main())