def main(argv=None):
    del argv  # Unused.

    version = sys.version_info
    logging.info(
        "Running under Python {0[0]}.{0[1]}.{0[2]}, Platform: {1}".format(
            version, platform.platform()))

    configure()
    if FLAGS.build == "config":
        print("You can now build with: %s " % " ".join(get_build_cmd()))
        return

    # Build
    run(get_build_cmd())

    # Test.
    if FLAGS.tests:
        cross_compile = platform.system().lower() != FLAGS.target
        if not cross_compile:
            run_tests_opts = []
            if FLAGS.gfxstream or FLAGS.crosvm or FLAGS.gfxstream_only:
                run_tests_opts.append("--skip-emulator-check")

            run_tests(FLAGS.out, FLAGS.test_jobs, FLAGS.crash != "none",
                      run_tests_opts)
        else:
            logging.info("Not running tests for cross compile.")

    # Create a distribution if needed.
    if FLAGS.dist:
        data = {
            "aosp": get_aosp_root(),
            "target": FLAGS.target,
            "sdk_build_number": FLAGS.sdk_build_number,
            "config": FLAGS.config,
        }

        create_distribution(FLAGS.dist, FLAGS.out, data)

    if platform.system() != "Windows" and FLAGS.config == "debug":
        overrides = open(
            os.path.join(get_qemu_root(), "android", "asan_overrides")).read()
        print("Debug build enabled.")
        print(
            "ASAN may be in use; recommend disabling some ASAN checks as build is not"
        )
        print("universally ASANified. This can be done with")
        print()
        print(". android/envsetup.sh")
        print("")
        print("or export ASAN_OPTIONS=%s" % overrides)
예제 #2
0
파일: cmake.py 프로젝트: taehoon1/qemu
def main(argv=None):
    del argv  # Unused.

    version = sys.version_info
    logging.info(
        'Running under Python {0[0]}.{0[1]}.{0[2]}, Platform: {1}'.format(
            version, platform.platform()))

    configure()
    if FLAGS.build == 'config':
        print('You can now build with: %s ' % ' '.join(get_build_cmd()))
        return

    # Build
    run(get_build_cmd())

    # Test.
    if FLAGS.tests:
        cross_compile = platform.system().lower() != FLAGS.target
        if not cross_compile:
            run_tests(FLAGS.out, FLAGS.test_jobs)
        else:
            logging.info("Not running tests for cross compile.")

    # Create a distribution if needed.
    if FLAGS.dist:
        data = {
            'aosp': get_aosp_root(),
            'target': FLAGS.target,
            'sdk_build_number': FLAGS.sdk_build_number,
            'config': FLAGS.config
        }

        create_distribution(FLAGS.dist, FLAGS.out, data)

    if platform.system() != 'Windows' and FLAGS.config == 'debug':
        overrides = open(
            os.path.join(get_qemu_root(), 'android', 'asan_overrides')).read()
        print("Debug build enabled.")
        print(
            "ASAN may be in use; recommend disabling some ASAN checks as build is not"
        )
        print("universally ASANified. This can be done with")
        print()
        print(". android/envsetup.sh")
        print("")
        print("or export ASAN_OPTIONS=%s" % overrides)