Esempio n. 1
0
    def test_HWComposer_2_0_Check_state(self):
        print "[RunTest]: %s" % self.__str__()
        special_actions.setup()

        def long_touch_operation():
            print "Starting long touch operation."
            special_actions.long_touch_on_1_1()
        self.develop_settings.set_disable_hw_overlays(switch='OFF')
        self.develop_settings.set_input_options(switch='ON')
        logcat.check_dumpsys_SurfaceFlinger_info(keyword="h/w composer enabled",
                                                 assertword="h/w composer enabled")
        primaryPlaneInfo = file_sys.get_file_context(matchCase=True,
                                                     file_path='/d/dri/0/i915_display_info',
                                                     keyword='Plane.*PRI',
                                                     extend=True,
                                                     ext_cmd="cut -d 'x' -f2 | cut -d '=' -f2")
        assert int(primaryPlaneInfo) > 0, "Invalid primary plane info."
        thread = threading.Timer(2, long_touch_operation)
        thread.start()
        check_list = []
        for i in range(6):
            time.sleep(.5)
            pointerPlaneInfo = file_sys.get_file_context(matchCase=True,
                                                         file_path='/d/dri/0/i915_display_info',
                                                         keyword='Plane.*CUR',
                                                         extend=True,
                                                         ext_cmd="cut -d 'x' -f2 | cut -d '=' -f2")
            check_list.append(pointerPlaneInfo)
        assert sum(int(i) for i in check_list) > 0, "Pointer info not detected."
Esempio n. 2
0
 def test_HWComposer_2_0_Color_inversion(self):
     print "[RunTest]: %s" % self.__str__()
     pre_chk = logcat.check_dumpsys_SurfaceFlinger_info(True, 'composer', 'enabled')
     assert pre_chk, "Color inversion is already taking effect."
     dbsetting.set_color_inversion(True)
     assert dbsetting.get_color_inversion() == 1, "Fail to enable color inversion."
     count = 0
     for i in range(5):
         time.sleep(1)
         count += logcat.check_dumpsys_SurfaceFlinger_info(True, 'composer', 'disabled')
         if count > 0: break
     assert count > 0, "Color inversion isn't taking effect."
Esempio n. 3
0
 def test_GPU_Composition_Mesa(self):
     assert logcat.check_dumpsys_SurfaceFlinger_info(
         True, 'GLES.*Mesa', 'Mesa'), "It's not mesa."
     self.benchmark.launch()
     self.benchmark.run_performance_test("test25")
     self.benchmark.check_all_results()
     g_common_obj.assert_exp_happens()
Esempio n. 4
0
    def test_GPU_CompositionFallback(self):
        """
        test_GPU_CompositionFallback

        Steps:
        1. Enable "Disable HW overlays" in developer options
        2. adb shell dumpsys SurfaceFlinger | grep -wi "GLES "
            GLES | xxxx | xxxx | xxxx | xx | xxxx |
        3. Start GLBenchmark 2.7 and run the Egypt HD ETC1 Onscreen test.
            The test runs without any errors and the workload images are properly displayed on the screen and we don't have artifacts.
        """
        assert logcat.check_dumpsys_SurfaceFlinger_info(
            True, 'GLES.*', 'GLES'), "Not found GLES info"

        print """[Step] 3. Start GLBenchmark 2.7 and run the Egypt HD ETC1 Onscreen test.
            The test runs without any errors and the workload images are properly displayed on the screen and we don't have artifacts."""
        self.benchmark.launch()
        self.benchmark.run_performance_test("test25")
        self.benchmark.check_all_results()
        g_common_obj.assert_exp_happens()