def init_environment(self): """ Init the test environment """ 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_androidvid') self.arti = Artifactory(cfg_arti.get('location')) apk_name = cfg.get("name") file_path = self.arti.get(apk_name) print "%s" % file_path result = config_handle.check_apps(self.pkg_name) if result == 0: g_common_obj.adb_cmd_common('install ' + file_path) video_name = cfg.get("video_arti") video_path = self.arti.get(video_name) g_common_obj.adb_cmd_common('push ' + video_path + ' /sdcard/') cmd = "am broadcast -a \ android.intent.action.MEDIA_MOUNTED -d file:///sdcard/" g_common_obj.adb_cmd(cmd) self.video = cfg.get("filename") bench_files = config.read(cfg_file, 'gfxbench31_files') busybox_path = self.arti.get(bench_files.get("busybox")) busybox_tar_path = bench_files.get("busybox_path") print g_common_obj.push_file(busybox_path, busybox_tar_path) print g_common_obj.adb_cmd_capture_msg("chmod 777 " + busybox_tar_path) self.md5_id = config.read(cfg_file, 'md5_id') self.check_path = self.md5_id.get('check_path')
def setUp(self): super(TestSetRingtoneProperty, self).setUp() self.func = OEMFunc(g_common_obj2.getSerialNumber()) cfg_file = os.path.join(os.environ.get('TEST_DATA_ROOT', ''), 'tests.tablet.oem.conf') self._test_name = __name__ print "[Setup]: %s" % self._test_name self.oem = OEMImpl(self.config.read(cfg_file, 'default')) self.oem.setup_connection() self.oem.set_orientation_n() self.oem.wake_up() u = self.config.read('/etc/oat/sys.conf', 'artifactory').get('location') print u f = u + 'IRDA_OEM_Customization/ringtone_property/' print f mp3_path = u + 'IRDA_OEM_Customization/ringtone/' self.filePath = Artifactory(f).get('oem.prop') self.filePath_mp3 = Artifactory(mp3_path).get('Kiss The Rain.mp3') self.func.mount_device() g_common_obj.adb_cmd("mv /oem/oem.prop /oem/oem.prop.bak") g_common_obj.adb_cmd("ls /oem") g_common_obj.push_file(self.filePath, "/oem/") g_common_obj.push_file(self.filePath_mp3, "/oem/media/") g_common_obj.adb_cmd("chmod 644 /oem/oem.prop")
def push_content(): """ push_media_contents_into_two_level_different_folder """ os.system("cd ~/Pictures") os.system("echo change to dir ~/pictures $?") g_common_obj.adb_cmd_common("shell mkdir -p /sdcard/DCIM/png") g_common_obj.push_file('~/Pictures/PNG', '/sdcard/DCIM/png/') g_common_obj.adb_cmd_common("shell mkdir -p /sdcard/Pictures/webp") g_common_obj.push_file('~/Pictures/WEBP', '/sdcard/Pictures/webp/')
def push_binary(file_path, tar_path, timeout=60): """ @summary: push binary to device and link to system binary @paramater: file_path: binary file path in host tar_path: target path in device timeout: push timeout @return: None """ g_common_obj.push_file(file_path, tar_path) chromd_cmd = "chmod 777 " + tar_path g_common_obj.adb_cmd_capture_msg(chromd_cmd)
def pull_and_push_thumbernail(): """ pull mediaProvider generates thumbernail to Host """ os.system("cd ~/Pictures") PhotosPPImpl().refresh_sdcard() os.system("echo change to dir ~/Pictures $?") os.system("mkdir -p ~/Pictures/thumbnails") g_common_obj.pull_file("~/Pictures/thumbnails", "/sdcard/DCIM/.thumbnails") time.sleep(2) g_common_obj.push_file("~/Pictures/thumbnails", "/sdcard/thumbnails") time.sleep(2) PhotosPPImpl().refresh_sdcard()
def _check_dependency(self): g_common_obj.root_on_device() g_common_obj.remount_device() g_common_obj.adb_cmd_capture_msg("logcat -G 16M") g_common_obj.adb_cmd_capture_msg("logcat -c") selection = { 'L': 'apk_l', 'M': 'apk_m', 'N': 'apk_n', 'O': 'apk_o', 'P': 'apk_p' } if not pkgmgr.query_package_name(self.package_name): try: file_path = environment_utils.get_resource_file( 'tests.common.dEQP.conf', 'dEQP', selection[self.os_ver]) pkgmgr.apk_install(file_path) except KeyError as e: print("DEQP app version not match with android os: %s" % str(e)) # Need to update above when new version is released. for i in self._mustpass_list: op = g_common_obj.adb_cmd_capture_msg('ls %s%s' % (self._mustpass_path, i)) if 'No such file' in op or op == '': file_path = environment_utils.get_resource_file( 'tests.common.dEQP.conf', 'dEQP', i.split('-')[0] + '_mustpass') if not g_common_obj.push_file(file_path, self._mustpass_path): raise Exception( "Fail to push must pass list, please use script to get resource before test." )
def setup(self): local_skia_test = self.arti.get(self.config.get("skia_test")) assert local_skia_test,\ "Download resource failed!" ret = g_common_obj.push_file(local_skia_test, self.dut_skia_test) assert ret, 'Failed push %s' % (local_skia_test) local_skia_bench = self.arti.get(self.config.get("skia_bench")) assert local_skia_bench,\ "Download resource failed!" ret = g_common_obj.push_file(local_skia_bench, self.dut_skia_bench) assert ret, 'Failed push %s' % (local_skia_bench) cmd = 'chmod 777 %s; chmod 777 %s'\ % (self.dut_skia_test, self.dut_skia_bench) g_common_obj.adb_cmd_capture_msg(repr(cmd))
def push_pictures(self, count=1, exts=None): remote_pictures = [] pictures = self.configer.read(self.config_file, "Pictures") if exts: pictures = { k: v for k, v in pictures.iteritems() if v.lower().endswith(exts) } if count > len(pictures.items()): assert False, \ "[FAILURE] There are not enough resource." for _, value in pictures.iteritems(): pic_path = self.arti.get(value) ret = g_common_obj.push_file(pic_path, self.dut_photos_dir) remote_pictures.append(self.dut_video_dir + '/' + os.path.basename(pic_path)) assert ret, 'Failed push %s' % (pic_path) count -= 1 if count == 0: break cmd = \ "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://%s"\ % (self.dut_photos_dir) g_common_obj.adb_cmd_capture_msg(repr(cmd)) print "[Debug] pushed %s" % (remote_pictures) return remote_pictures
def setup(self): """busybox setup""" self.clean() rfile = self.arti.get(self.config.get("file")) ret = g_common_obj.push_file(rfile, self.dut_bin) assert ret, 'Failed push %s' % (self.dut_bin) cmd = "chmod 777 %s; %s --help| %s head -1"\ % (self.dut_bin, self.dut_bin, self.dut_bin) output = g_common_obj.adb_cmd_capture_msg(repr(cmd)) print "[Debug] %s" % (output)
def setup(self): """resource setup""" cmd = "cd %s || mkdir -p %s" % (self.dut_res_dir, self.dut_res_dir) g_common_obj.adb_cmd_capture_msg(repr(cmd)) res_files = self.configer.read(self.config_file, "EventFiles") for key_name, value in res_files.iteritems(): print "[Debug] install %s" % (key_name) res_file = self.arti.get(value) ret = g_common_obj.push_file(res_file, self.dut_res_dir) assert ret, 'Failed push %s' % (res_file) self.actions.append(key_name) print "[Debug] installed actions\n%s" % (self.actions)
def push_dependency(self): ''' Push libs and binary to device. ''' bin_file = self.get_binary_file_name() # Push binary g_common_obj.push_file(self.arti.get(self.remote_bin_path), self.dut_binary_path) g_common_obj.adb_cmd_common("shell chmod 755 %s/%s" % (self.dut_binary_path, bin_file)) # Push must libs g_common_obj.push_file(self.arti.get(self.remote_libcairo_path), self.dut_lib_path) g_common_obj.push_file(self.arti.get(self.remote_libft2_path), self.dut_lib_path) # Push optional libs try: g_common_obj.push_file(self.arti.get(self.remote_libkmod_path), self.dut_vendor_lib_path) g_common_obj.push_file( self.arti.get(self.remote_libpciaccess_path), self.dut_vendor_lib_path) except: pass
def setup(self): """setup implement's resource file""" busybox_obj.setup() if not pkgmgr._package_installed(pkgName=self.PKG_NAME): file_path = self.config.get("apk") apk_path = self.arti.get(file_path) pkgmgr.apk_install(apk_path) cmd = "cd %s || mkdir -p %s" % (self.apk_cache_dir, self.apk_cache_dir) g_common_obj.adb_cmd_capture_msg(repr(cmd)) apk_cache_files = self.arti.get(self.config.get("apk_cache_files")) ret = g_common_obj.push_file(apk_cache_files, self.dut_download) assert ret, 'Failed push %s' % (apk_cache_files) files_name = os.path.basename(apk_cache_files) cmd = "busybox tar zxf %s/%s --directory %s > /dev/null 2>&1 && print UnzipComplete"\ % (self.dut_download, files_name, self.apk_cache_dir) output = busybox_obj.adb_busybox_cmd(repr(cmd), 60 * 10) assert 'UnzipComplete' in output,\ "[FAILURE] Failed unzip: %s" % (files_name)
def push_videos(self, count=1, like=None, exts=None): remote_videos = [] videos = self.configer.read(self.config_file, "Videos") if like: videos = { k: v for k, v in videos.iteritems() if v.lower().find(like.lower()) != -1 } if exts: videos = { k: v for k, v in videos.iteritems() if v.lower().endswith(exts) } # if like and exts: # videos = { k:v for k, v in videos.iteritems() if os.path.basename(v) == like + exts } if count > len(videos.items()): assert False, \ '[FAILURE] The video is not in config file ' + self.config_file for _, value in videos.iteritems(): pic_path = self.arti.get(value) ret = g_common_obj.push_file( pic_path, self.dut_video_dir + '/' + os.path.basename(pic_path)) assert ret, 'Failed push %s' % (pic_path) remote_videos.append(self.dut_video_dir + '/' + os.path.basename(pic_path)) count -= 1 if count == 0: break cmd = \ "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://%s"\ % (self.dut_video_dir) g_common_obj.adb_cmd_capture_msg(repr(cmd)) print "[Debug] pushed %s" % (remote_videos) return remote_videos
def setup_enviroment(cfg): """ @summary: set up gits enviroment """ if g_common_obj.adb_cmd_capture_msg("ps | grep adbd")[0:4] != "root": g_common_obj.root_on_device() # g_common_obj.remount_device() config_handle = ConfigHandle() cfg["artifactory_location"] = config_handle.read_configuration( 'artifactory', 'location', '/etc/oat', 'sys.conf') arti = Artifactory(cfg.get('artifactory_location')) renderscript_player_path = arti.get(cfg.get("renderscript_player")) busybox_path = arti.get(cfg.get("busybox")) gits_path = arti.get(cfg.get("gits")) busybox_tar_path = cfg.get("busybox_path") gits_tar_path = cfg.get("gits_path") g_common_obj.adb_cmd_capture_msg("mkdir -p " + os.path.dirname(gits_tar_path)) g_common_obj.push_file(busybox_path, busybox_tar_path) g_common_obj.push_file(gits_path, gits_tar_path) g_common_obj.push_file(renderscript_player_path, os.path.dirname(gits_tar_path)) print g_common_obj.adb_cmd_capture_msg("chmod 777 " + busybox_tar_path) print g_common_obj.adb_cmd_capture_msg("chmod 777 " + gits_tar_path) print g_common_obj.adb_cmd_capture_msg( "chmod 777 " + os.path.dirname(gits_tar_path) + "/" + os.path.basename(renderscript_player_path)) # install busybox to /data/bb print g_common_obj.adb_cmd_capture_msg("mkdir -p /data/bb") print g_common_obj.adb_cmd_capture_msg(busybox_tar_path + " --install -s /data/bb") # print g_common_obj.adb_cmd_capture_msg(busybox_tar_path) # install gits print g_common_obj.adb_cmd_capture_msg("\"cd " + \ os.path.dirname(gits_tar_path) + ";" + "export PATH=$PATH:/data/bb" + ";" + "sh " + gits_tar_path + "\"")
class dEQPImpl(object): def __init__(self): self._device = g_common_obj.get_device() self.tmp = tempfile.gettempdir() self.tmpdir = getTmpDir() self.inside_output = "/sdcard/TestResult.qpa" self.device = g_common_obj.get_test_device() self.env = EnvironmentUtils() self._mustpass_path = '/sdcard' self._mustpass_list = [ 'vk-master.txt', 'egl-master.txt', 'gles2-master.txt', 'gles3-master.txt', 'gles31-master.txt' ] self._failure_log = os.path.join( g_common_obj.globalcontext.user_log_dir, 'deqp_failures.log') self._raw_deqp_result = os.path.join( g_common_obj.globalcontext.user_log_dir, 'deqp_test_result.log') self._extension_list = os.path.join( g_common_obj.globalcontext.user_log_dir, 'extension_list.log') def setup(self): g_common_obj.root_on_device() g_common_obj.remount_device() g_common_obj.adb_cmd_capture_msg("logcat -c") self._check_dependency() def run_case(self, case_name, check_extensions=False, extension_name=''): _inside_output = self.inside_output # Add inside function for further check extension tests. def _get_extension_list(): inside_content = g_common_obj.adb_cmd_capture_msg('cat %s' % _inside_output) return re.findall(r'\ +?<Text>(.+)</Text>', inside_content) # Start run deqp test. _results = { 'Passed': 0, 'Failed': 0, 'Not supported': 0, 'Warnings': 0 } LOG.debug("Testcase: %s" % (case_name)) setlog_cmd = "setprop log.tag.dEQP DEBUG" cmd = "am start -S -n com.drawelements.deqp/android.app.NativeActivity -e cmdLine \"" \ "deqp --deqp-log-filename=%s --deqp-case=%s\"" % (self.inside_output, case_name) self.device.adb_cmd_capture_msg_ext(repr(setlog_cmd)) self.device.adb_cmd_capture_msg_ext(repr(cmd)) # failures = ['Fail', 'ResourceError', 'Crash', 'Timeout', 'InternalError'] s_time = time.time() while time.time() - s_time < 900: cur_window = get_current_focus_window() time.sleep(2) if PACKAGENAME not in cur_window: LOG.debug("Test finished.") # Save deqp results to log. g_common_obj.adb_cmd_capture_msg('logcat -d -s dEQP > %s' % self._raw_deqp_result) # Handle results. logs = Popen('cat %s' % self._raw_deqp_result, shell=True, stdout=PIPE, stderr=PIPE).communicate()[0] for i in _results.keys(): chk_log = r"logcat -d -s dEQP | grep -oe '%s:\ \+[0-9]\+/[0-9]\+'" % i try: output = g_common_obj.adb_cmd_capture_msg(chk_log) num = output.split(' ')[-1].split('/')[0] _results[i] = int(num) except ValueError as e: raise Exception("Got error when running tests: %s" % e) assert sum(_results.values()) != 0, LOG.debug("Test not run.") LOG.debug("Raw summary: %s" % _results) if _results['Failed'] > 0: raw_failures = re.findall( r'Test case .(dEQP-.*[\d|\w]).+\n.+?dEQP +: +Fail.+?.', logs) head_name = raw_failures[0].split('.')[0].split( '-')[-1].lower() real_failures = [] for i in raw_failures: _is_mustpass = "******" % ( self._mustpass_path, head_name, i) chk = g_common_obj.adb_cmd_capture_msg(_is_mustpass) if chk == '': _results['Failed'] -= 1 _results['Not supported'] += 1 else: real_failures.append(i) if len(real_failures) > 0: f = open(self._failure_log, 'w') for i in real_failures: f.write(i + '\n') f.close() LOG.debug("Final summary: %s" % _results) # Handle event for extension list check. if check_extensions: ext_list = _get_extension_list() f = open(self._extension_list, 'w') # Save extension list to logfile. for el in ext_list: f.write(el + '\n') f.close() LOG.info("Extension list saved in: %s" % self._extension_list) assert extension_name in ext_list, "%s is not in this test." % extension_name LOG.info("%s is found in this test." % extension_name) return True else: if _results['Failed'] == 0: LOG.info("All tests passed.") return True else: raise Exception( "dEQP test failed, details refer to log file: %s" % self._failure_log) else: time.sleep(3) raise Exception("Test timeout.") def _check_dependency(self): if not pkgmgr._package_installed(pkgName=PACKAGENAME): android_version = self.env.get_android_version() selection = { 'L': 'apk_l', 'M': 'apk_m', 'N': 'apk_n', 'O-MR0': 'apk_omr0', 'O-MR1': 'apk_omr1' } try: file_path = get_resource_from_atifactory( 'tests.common.dEQP.conf', 'dEQP', selection[android_version]) pkgmgr.apk_install(file_path) except KeyError, e: print "DEQP app version not match with android os: %s" % str(e) # Need to update above when new version is released. for i in self._mustpass_list: op = g_common_obj.adb_cmd_capture_msg('ls %s/%s' % (self._mustpass_path, i)) if 'No such file' in op: file_path = get_resource_from_atifactory( 'tests.common.dEQP.conf', 'dEQP', i.split('-')[0] + '_mustpass') g_common_obj.push_file(file_path, self._mustpass_path + '/')
def commonTest(self, config, section=None): print "[RunTest]: %s" % self.__str__() if not section: section = self.id().split('.')[-1] case_cfg = TestConfig() cfg = case_cfg.read(config, section) config_handle = ConfigHandle() cfg["artifactory_location"] = config_handle.read_configuration( 'artifactory', 'location', '/etc/oat', 'sys.conf') arti = Artifactory(cfg.get('artifactory_location')) stream_fullpath = arti.get(cfg.get("stream")) stream_folder, stream_file = os.path.split(stream_fullpath) stream_name = os.path.basename(stream_file).split('.')[0] local_temp = '%s/%s' % (self.conf.get("local_temp"), stream_name) base_screenshots_path = '%s/base' % (local_temp) down_screenshots_path = '%s/remote' % (local_temp) remote_path = self.conf.get("remote_temp") os.system("rm -rf %s; mkdir -p %s" % (local_temp, local_temp)) os.system("mkdir -p %s" % (base_screenshots_path)) os.system("mkdir -p %s" % (down_screenshots_path)) os.system("rm -rf %s/%s" % (stream_folder, stream_name)) os.system("tar -C %s -zxvf %s" % (stream_folder, stream_fullpath)) os.system("mv -v %s/%s/%s/* %s" \ % (stream_folder, stream_name,\ self.conf.get("screenshots_subpath"), base_screenshots_path)) check_points = [] for path, _, files in os.walk(base_screenshots_path): for _name in files: _point = int(re.findall('\d+', _name)[0]) _full_path = os.path.join(path, _name) _remote_path = '%s/%s/%s/%s'\ % (remote_path, stream_name,\ self.conf.get("screenshots_subpath"), _name) check_points.append((_point, _name, _full_path, _remote_path)) assert check_points, "check_points empty!" check_points = deque(sorted(check_points, key=lambda t: t[0])) print "Check Points\n%s" % ([p[0] for p in check_points]) g_common_obj.adb_cmd_capture_msg("rm -rf %s/%s; sync"\ % (remote_path, stream_name)) ret = g_common_obj.push_file("%s/%s" % (stream_folder, stream_name),\ "%s/%s" % (remote_path, stream_name)) assert ret, 'Failed push %s' % (stream_name) gits_player = self.conf.get("gits_player") while len(check_points) > 0: point1, name1, fullpath1, _remote_path1 = check_points.popleft() point2, name2, fullpath2, _remote_path2 =\ point1, name1, fullpath1, _remote_path1 if len(check_points) > 0: point2, name2, fullpath2, _remote_path2 =\ check_points.popleft() lenth = point2 - point1 if point2 - point1 > 0 else 1 cmd_play = '%s %s/%s --captureFrames %s-%s:%s'\ % (gits_player, remote_path, stream_name,\ point1, point2, lenth) g_common_obj.adb_cmd_capture_msg(cmd_play) pull_path1 = '%s/%s' % (down_screenshots_path, name1) ret = g_common_obj.pull_file(pull_path1, _remote_path1) assert ret, 'Failed get %s' % (_remote_path1) self._diff_imag_file(stream_name, fullpath1, pull_path1) if point1 == point2: continue pull_path2 = '%s/%s' % (down_screenshots_path, name2) ret = g_common_obj.pull_file(pull_path2, _remote_path2) assert ret, 'Failed get %s' % (_remote_path1) self._diff_imag_file(stream_name, fullpath2, pull_path2) g_common_obj.adb_cmd_capture_msg("rm -rf %s/%s; sync"\ % (remote_path, stream_name))
def testPushSytemResourceFiles(self): """ Push system resources files to devices """ self.flag = [] 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_oglconform') arti = Artifactory(cfg_arti.get('location')) binary_name = cfg.get("name") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/oglconform") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/oglconform') self.flag.append(output) egl_config = cfg.get("egl_config") egl_config_file_path = arti.get(egl_config) output = g_common_obj.push_file(egl_config_file_path, "/data/app/egl-config") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/egl-config') self.flag.append(output) egl_config = cfg.get("binary_es3") egl_config_file_path = arti.get(egl_config) output = g_common_obj.push_file(egl_config_file_path, "/data/app/get-program-binary_es3") g_common_obj.adb_cmd_common( 'shell chmod 777 /data/app/get-program-binary_es3') self.flag.append(output) cfg = config.read(cfg_file, 'content_gits') arti = Artifactory(cfg_arti.get('location')) binary_name = cfg.get("busybox") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/busybox") g_common_obj.adb_cmd_common('shell chmod 777 /data/busybox') self.flag.append(output) cfg = config.read(cfg_file, 'content_GLCTS') arti = Artifactory(cfg_arti.get('location')) binary_name = cfg.get("name") file_path = arti.get(binary_name) print "push android_standalone_x86/ to DUT" output = g_common_obj.push_file(file_path, "/data/app/") g_common_obj.adb_cmd_common( "shell /data/busybox tar xzvf /data/app/android_standalone_x86.tgz -C /data/app", 10) g_common_obj.shell_cmd("rm -rf android_standalone_x86*") g_common_obj.adb_cmd_common( 'shell rm /data/app/android_standalone_x86.tgz') g_common_obj.adb_cmd_common( 'shell chmod 777 /data/app/android_standalone_x86/glcts') g_common_obj.adb_cmd_common( 'shell chmod 777 /data/app/android_standalone_x86/test.sh') self.flag.append(output) cfg = config.read(cfg_file, 'content_conform') arti = Artifactory(cfg_arti.get('location')) binary_name = cfg.get("name") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/conform") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/conform') self.flag.append(output) binary_name = cfg.get("covegl") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/covegl") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/covegl') self.flag.append(output) binary_name = cfg.get("covgl") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/covgl") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/covgl') self.flag.append(output) binary_name = cfg.get("primtest") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/primtest") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/primtest') self.flag.append(output) cfg = config.read(cfg_file, 'content_android_extension_pack') arti = Artifactory(cfg_arti.get('location')) binary_name = cfg.get("name") file_path = arti.get(binary_name) output = g_common_obj.push_file(file_path, "/data/app/oglconform_x86") g_common_obj.adb_cmd_common('shell chmod 777 /data/app/oglconform_x86') self.flag.append(output) for i in range(0, len(self.flag)): if self.flag[i] is False: return False return True