コード例 #1
0
ファイル: appCase.py プロジェクト: 582646612/python
 def pull_crash_log(self):
     log = ""
     print("pull_crash_log")
     _read_crash = basePickle.read_pickle(common.CRASH_LOG_PATH)
     if len(_read_crash) > 0:
         for i in range(len(_read_crash)):
                 if _read_crash[i]["devices"] == self.get_phone_name()[1]: #如果android 传过来的device和现在测试的decvice相匹配
                     log = _read_crash[i]["log"]
                     rand_log = baseRandom.get_ran_dom()+".log" # 随机的log文件
                     push_log = common.APACHE_PATH+rand_log # 存到apache的路径里面
                     os.system("adb -s "+ self.devices+" pull "+log+" " +push_log)
                     return common.PROTOCOL + common.HOST +"/"+common.APACHE_PATH+rand_log
     return log
コード例 #2
0
ファイル: appCase.py プロジェクト: majyer/pythonlanguage
 def pull_crash_log(self):
     log = ""
     print("pull_crash_log")
     _read_crash = basePickle.read_pickle(common.CRASH_LOG_PATH)
     if len(_read_crash) > 0:
         for i in range(len(_read_crash)):
             if _read_crash[i]["devices"] == self.get_phone_name()[1]:
                 log = _read_crash[i]["log"]
                 rand_log = baseRandom.get_ran_dom(
                 ) + ".log"  # random log file
                 push_log = common.APACHE_PATH + rand_log  #save to apache path
                 os.system("adb -s " + self.devices + " pull " + log + " " +
                           push_log)
                 return common.PROTOCOL + common.HOST + "/" + common.APACHE_PATH + rand_log
     return log