blob: 8866d3780aec75b6dd58c694c0b0fe9d38629948 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_api
QEMU_CIPD_VERSION = 'git_revision:533bf2563d0213a7e002d9fcde75519d30ffa70f'
AEMU_CIPD_VERSION = 'git_revision:058240c99e7a1b0782798a2e536f2be75b5f08cf'
class EmuApi(recipe_api.RecipeApi):
def is_emulator_type(self, device_type):
"""Determines if the given device is an emulator.
Args:
device_type (str): The device to check.
"""
return device_type == 'QEMU' or device_type == 'AEMU'
def add_aemu_to_ensure_file(self, ensure_file, subdir=None):
ensure_file.add_package(
'fuchsia/third_party/aemu/${platform}',
AEMU_CIPD_VERSION,
subdir=subdir)
def add_qemu_to_ensure_file(self, ensure_file, subdir=None):
ensure_file.add_package(
'fuchsia/third_party/qemu/${platform}',
QEMU_CIPD_VERSION,
subdir=subdir)