Exemple #1
0
 def setUp(self):
     super(RunBasemark, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._glBenchmark = GLBenchmarkImpl()
     self.benchmark = GLBenchmarkExtendImpl()
     close_all_tasks()
Exemple #2
0
class AaaGTest(UIATestBase):
    @classmethod
    def setUpClass(self):
        apk = get_resource("GLBenchmark_2_7_0.apk")
        g_common_obj.adb_cmd_common('install -r ' + apk, 300)

    def setUp(self):
        super(AaaGTest, self).setUp()
        self.debug_card = DebugCard()
        self.debug_card.open()
        self._glBenchmark = GLBenchmarkImpl()
        self.benchmark = GLBenchmarkExtendImpl()

    def tearDown(self):
        super(AaaGTest, self).tearDown()
        self._glBenchmark.stop_app_am()
        self.benchmark.clean()
        self.debug_card.close()

    def get_dom0_ssh(self):
        return self.debug_card.get_ssh()

    def test_stress_wayland_tool_GFXBench(self):
        # launch and run GL_Benchmark in DomU
        self.benchmark.launch()

        # download and copy wayland stress tool to Dom0
        fname = "stress_wayland.tar.gz"
        stress_tool_pkg = get_resource(fname)
        dom0_ssh = self.get_dom0_ssh()
        self.assertIsNotNone(dom0_ssh, 'Failed to get dom0 ssh client.')
        dom0_ssh.run_cmd('mkdir -p /test')
        dom0_ssh.push(stress_tool_pkg, '/test/' + fname)
        dom0_ssh.run_cmd('cd /test/; tar -xf ' + fname)

        # run wayland stress tool
        cmds = [
            'cd /test/stress_wayland',
            './gpuhighpri2 params/dials.160',
        ]
        proc = dom0_ssh.run_cmd_async(' && '.join(cmds))

        def get_latest_fps():
            if proc.stdout:
                line = proc.stdout.splitlines()[-1]
                print line
                return float(line.split()[-2])

        self.benchmark.run_performance_test_async("test5")
        try:
            for _ in range(6):
                assert get_latest_fps() > 50  # check fps in Dom0
                time.sleep(5)
        finally:
            proc.kill()  # kill and cleanup
    def __init__(self):
        GLBenchmarkImpl.__init__(self)
        self.device = g_common_obj.get_device()
        self.home = GLBenchmarkExtendImpl.HomeUI(self.device)
        self.performc = GLBenchmarkExtendImpl.TestList(self.device)

        self.configer = TestConfig()
        self.config = self.configer.read(self.CONFIG_FILE, "GLBenchmark")
        config_handle = ConfigHandle()
        self.config["artifactory_location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat', 'sys.conf')
        self.arti = Artifactory(self.config.get('artifactory_location'))
Exemple #4
0
class RunBasemark(UIATestBase):
    '''
    Replaced with benchmark app since houdini not supported anymore.
    '''
    @classmethod
    def setUpClass(self):
        """
        install apk
        """
        super(RunBasemark, self).setUpClass()
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat/', 'sys.conf')
        cfg = config.read(cfg_file, 'content_graphic')
        arti = Artifactory(cfg_arti.get('location'))
        apk_name = cfg.get("name")
        file_path = arti.get(apk_name)
        result = config_handle.check_apps("com.glbenchmark.glbenchmark27")
        if result == 0:
            g_common_obj.adb_cmd_common('install -r ' + file_path, 300)

    @classmethod
    def tearDownClass(self):
        """
        uninstall apk
        """
        super(RunBasemark, self).tearDownClass()

    def setUp(self):
        super(RunBasemark, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._glBenchmark = GLBenchmarkImpl()
        self.benchmark = GLBenchmarkExtendImpl()
        close_all_tasks()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(RunBasemark, self).tearDown()
        self._glBenchmark.stop_app_am()
        self._glBenchmark = None
        self.benchmark.clean()

    def test_CheckTearing_BasemarkES2v1_Taiji_Hover(self):
        print "[RunTest]: %s" % self.__str__()
        self.benchmark.launch()
        self.benchmark.run_performance_test("test25")
        self.benchmark.check_all_results()
        g_common_obj.assert_exp_happens()
Exemple #5
0
    def __init__(self):
        GLBenchmarkImpl.__init__(self)
        self.device = g_common_obj.get_device()
        self.home = Gfxbench30Impl.HomeUI(self.device)
        self.testlist = Gfxbench30Impl.TestList(self.device)

        self.configer = TestConfig()
        self.config = self.configer.read(self.CONFIG_FILE, "Gfxbench30Impl")
        config_handle = ConfigHandle()
        self.config["artifactory_location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat', 'sys.conf')
        self.arti = Artifactory(self.config.get('artifactory_location'))
        self.apk_cache_dir = self.config.get("apk_cache_dir")
        self.dut_download = self.config.get("dut_download")
Exemple #6
0
 def setUp(self):
     print "[Setup]:%s" % self.__class__.__name__
     super(VsyncFPSTool, self).setUp()
     self.tmpdir = getTmpDir()
     self.systemui = SystemUiExtendImpl()
     self.benchmark = GLBenchmarkExtendImpl()
     self._glBenchmark = GLBenchmarkImpl()
Exemple #7
0
 def setUp(self):
     super(AaaGTest, self).setUp()
     self.debug_card = DebugCard()
     self.debug_card.open()
     self._glBenchmark = GLBenchmarkImpl()
     self.benchmark = GLBenchmarkExtendImpl()
Exemple #8
0
 def setUp(self):
     super(BurstFrequency, self).setUp()
     self._test_name = __name__
     print "[Setup]: %s" % self._test_name
     self._glBenchmark = GLBenchmarkImpl()
     self.benchmark = GLBenchmarkExtendImpl()
Exemple #9
0
class BurstFrequency(UIATestBase):
    @classmethod
    def setUpClass(self):
        """
        install apk
        """
        super(BurstFrequency, self).setUpClass()
        g_common_obj.root_on_device()
        g_common_obj.remount_device()
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration(
            'artifactory', 'location', '/etc/oat/', 'sys.conf')
        cfg = config.read(cfg_file, 'content_graphic')
        arti = Artifactory(cfg_arti.get('location'))
        # apk_name = cfg.get("name")
        apk_name = cfg.get("name_270")
        file_path = arti.get(apk_name)
        # g_common_obj.adb_cmd_common('install ' + file_path, 600)
        os.system("adb install -r -g %s" % file_path)

    @classmethod
    def tearDownClass(self):
        """
        uninstall apk
        """
        super(BurstFrequency, self).tearDownClass()

    def setUp(self):
        super(BurstFrequency, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._glBenchmark = GLBenchmarkImpl()
        self.benchmark = GLBenchmarkExtendImpl()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(BurstFrequency, self).tearDown()
        self._glBenchmark.stop_app_am()
        self._glBenchmark = None
        self.benchmark.clean()

    def test_Burst_Frequency(self):
        """
        This test case is to Run GLBenchmark 2.5.1 Egypt HD ETC1 OnScreen test

        Test Case Precondition:
        GLBenchmark 2.5.1 apk installed on DUT

        Test Case Step:
        1. Launch GLBenchmark
        2. Open Performance Tests, select GLBenchmark 2.7 EgyptHD ETC1
        3. Start run with Onscreen

        Expect Result:
        1. GLBenchmark can run successfully and fluently

        The real implementation will be in GLBenchmarkImpl class.
        """

        print "[RunTest]: %s" % self.__str__()
        self.benchmark.launch()
        self.benchmark.run_performance_check_burstfrequency("test23",
                                                            timeout=180)
        g_common_obj.assert_exp_happens()
class RunGLBenchmark(UIATestBase):

    @classmethod
    def setUpClass(self):
        """
        install apk
        """
        super(RunGLBenchmark, self).setUpClass()
        config = TestConfig()
        cfg_file = 'tests.tablet.artifactory.conf'
        cfg_arti = config.read(cfg_file, 'artifactory')
        config_handle = ConfigHandle()
        cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')
        cfg = config.read(cfg_file, 'content_graphic')
        arti = Artifactory(cfg_arti.get('location'))
        apk_name = cfg.get("name")
        file_path = arti.get(apk_name)
        result = config_handle.check_apps("com.glbenchmark.glbenchmark27")
        if result == 0:
            g_common_obj.adb_cmd_common('install -r ' + file_path, 300)

    @classmethod
    def tearDownClass(self):
        """
        uninstall apk
        """
        super(RunGLBenchmark, self).tearDownClass()

    def setUp(self):
        super(RunGLBenchmark, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._glBenchmark = GLBenchmarkImpl()
        self.benchmark = GLBenchmarkExtendImpl()
        close_all_tasks()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(RunGLBenchmark, self).tearDown()
        self._glBenchmark.stop_app_am()
        self._glBenchmark = None
        self.benchmark.clean()

    def testEgyptHDETC1ScreenOn(self):
        """
        This test case is to Run GLBenchmark 2.7 Egypt HD ETC1 OnScreen test

        Test Case Precondition:
        GLBenchmark 2.7 apk installed on DUT

        Test Case Step:
        1. Launch GLBenchmark
        2. Open Performance Tests, select GLBenchmark 2.7 EgyptHD ETC1
        3. Start run with Onscreen

        Expect Result:
        1. GLBenchmark can run successfully and fluently

        The real implementation will be in GLBenchmarkImpl class.
        """

        print "[RunTest]: %s" % self.__str__()
        self.benchmark.launch()
        self.benchmark.run_performance_test("test23")
        self.benchmark.check_all_results()
        g_common_obj.assert_exp_happens()