def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        self.device = g_common_obj.get_device()
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._imageviewer = ImageDetails()
        self.photos = PhotosExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
        g_common_obj.root_on_device()
        g_common_obj.remount_device()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        self.photos.clean()

        self.qrcode = "GIFPICTURE"
        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, 'qrcode_marked_image')
        self.qrcode = cfg.get("screenshot_edit_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("screenshot_edit_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.photosImpl.refresh_sdcard()
        special_actions.setup()
        self.photos.setup()
Ejemplo n.º 2
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."
Ejemplo n.º 3
0
    def setup(self):
        """setup environment"""
        self.launch()
        time.sleep(2)
        device = self.d
        if device(textContains="No thanks").exists:
            device(textContains="No thanks").click()

        special_actions.setup()
 def setUp(self):
     super(VideoPlayback, self).setUp()
     self._test_name = __name__
     self.device = g_common_obj.get_device()
     print "[Setup]: %s" % self._test_name
     #         g_common_obj.root_on_device()
     #         g_common_obj.remount_device()
     self.photos = get_photo_implement()
     self.photosImpl = PhotosExtendImpl()
     self._qr = QRcode()
     self.photos.rm_delete_photos()
     self.photos.refresh_sdcard()
     self.remote_path = self.photosImpl.push_videos(
         count=1, like='test_video_qr_bottom', exts='.mp4')[0]
     special_actions.setup()
    def setUp(self):
        print "[Setup]:%s" % self.__class__.__name__
        super(WallpaperSetPNGImageTest, self).setUp()

        self.photos = PhotosExtendImpl()
#         self.camera = CameraExtendImpl()
#         self.systemui = SystemUiExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
#         self.wallpaper = WallpaperImpl()
#
#         self.systemui.unlock_screen()
#         self.d.screen.on()
#         self.d.press.menu()
#
#         self.photos.clean()
#         self.camera.clean()
#         self.photosImpl.rm_delete_photos()
#         self.photosImpl.refresh_sdcard()
#         self.wallpaper.reset_wallpaper()

        self.qrcode = "GIFPICTURE"
        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, 'qrcode_marked_image')
        self.qrcode = cfg.get("wallpaperset_png_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("wallpaperset_png_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.pic_path = '/sdcard/Pictures/' + os.path.basename(file_path)
        self.photosImpl.refresh_sdcard()
        special_actions.setup()

        self.mark_time = logcat.get_device_time_mark()
    def setUp(self):
        print "[Setup]:%s" % self.__class__.__name__
        super(ImageViewingSuspendResumeByCommandTest, self).setUp()
        self.photos = PhotosExtendImpl()
        #         self.camera = CameraExtendImpl()
        self.systemui = SystemUiExtendImpl()
        self.photosImpl = get_photo_implement()
        self.qrcodeImpl = QRcode()
        self.device = g_common_obj.get_device()
        self.systemui.unlock_screen()
        self.device.screen.on()
        #         self.device.press.menu()
        self.photosImpl.rm_delete_photos()
        self.photosImpl.refresh_sdcard()
        self.photos.clean()
        #         self.camera.clean()

        self.qrcode = "QRCODE_TEST_STRING"
        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_picture')
        self.qrcode = cfg.get("imageviewing_qrcode")
        print "[Debug] qrcode:%s" % (self.qrcode)
        arti = Artifactory(cfg_arti.get('location'))
        pic_name = cfg.get("qr_image")
        file_path = arti.get(pic_name)
        g_common_obj.adb_cmd_common('push ' + file_path + ' /sdcard/Pictures')
        self.photosImpl.refresh_sdcard()
        special_actions.setup()
        self.photosImpl.launch_photos_am()
        self.mark_time = logcat.get_device_time_mark()