import os


import portpicker

import gflags as flags
from tools.android.emulator import resources
from google.apputils import basetest as googletest
from tools.android.emulator import emulated_device
from tools.android.emulator import fake_android_platform_util

FLAGS = flags.FLAGS
flags.DEFINE_string('api_level', '',
                    'Api level of system images')

root_dir = os.path.abspath(resources.GetRunfilesDir())


class EmulatedDeviceSoftwareOpenGlIntegrationTest(googletest.TestCase):

  def testStartEmulator_x86(self):
    self._Test(0)  # 0 starts no X11VncServer

  def testStartEmulator_x86_with_x11vnc(self):
    self._Test(portpicker.PickUnusedPort())

  def _Test(self, start_vnc_on_port):
    device = None
    attempts = 0
    last_err = None
コード例 #2
0
import collections
import os
import tempfile

import mox

from tools.android.emulator import resources
from google.apputils import basetest as googletest
from tools.android.emulator import common
from tools.android.emulator import emulated_device
from tools.android.emulator import emulator_meta_data_pb2
from tools.android.emulator import fake_android_platform_util

root_dir = os.path.abspath(
    os.path.join(resources.GetRunfilesDir(), 'android_test_support'))

ANR_LOGS = """
I/am_proc_died(  951): [0,1753,com.android.contacts]
I/am_proc_died(  951): [0,1644,com.android.music]
I/am_crash(  951): [2280,0,com.an.de,89,java.lang.Ill,When they c,Ba.java,147]
I/am_proc_died(  951): [0,2280,com.android.development]
I/am_crash(  951): [2386,0,c.a.d,8961605,j.lang.Il,When they come,Bad.java,155]
I/am_proc_died(  951): [0,2386,com.android.development]
I/am_proc_died(  951): [0,2409,com.android.development]
I/am_anr  (  951): [0,2426,c.a.d,8961605,keyDispatchingTimedOut]
I/am_anr  (  951): [0,2426,c.a.de,8961605,keyDispatchingTimedOut]
I/am_proc_died(  951): [0,2426,com.android.development]
I/am_anr  (  951): [0,2452,com.android.de,8961605,keyDispatchingTimedOut]
I/am_proc_died(  951): [0,1446,com.google.process.gapps]
I/am_proc_died(  951): [0,1484,com.android.phone]