admin管理员组

文章数量:1567760

2024年1月6日发(作者:)

if not (() + "log"): rs(() + "log") Path = () + "log" _file = Path + PD + "_aging_" + SN + "_" + Time + ".log" while True: s = () F = (_file, "a+",encoding='gb18030') (s) ()

#主测试程序class Main_Test(d): def __init__(self,queue,parent = None): super(Main_Test,self).__init__(parent) = queue = True g = True = "QPushButton{background-color:RED}" = "QPushButton{background-color:YELLOW}" = "QPushButton{background-color:GREEN}" _ini = Config_ini("ini/") #_Server_IP = __info("GNS", "Server_IP") _aging_time = int(__info("GNS", "aging_time"))

# 获取本地ip def Local_IP(self): Local_IP = tbyname(tname()) return Local_IP

#连接设备 def Connection(self,host): username = "gns" passwd = "feitian" try: t = ssh(str(host),username,passwd) _Command("n") except Exception,e: _Fail(str(e))

#发送接收数据 def Send_Command(self,Command,Prompt='#',Timeout=10,click_time=1): try: buff = "" log = "" (Command) (1) runtime = () while Prompt not in buff: buff = "" (3) buff += (999999,click_time) log += buff (buff) steptime = () if (steptime - runtime).seconds > Timeout: _Fail(u"超时, %s 不能找到" % Prompt) break return log except Exception: _Fail(u"%s不能找到" % Prompt)

#记录结果 def Save_Result(self,SN,Status,Time): try: if not (() + "Record"): rs(() + "Record")

else: _Command("hi8435_cfg wrDiscOut %s low" % str(i)) low = _Command("arinc get_signalstatusmatrix", '#', 5) low=dleStr(low,'get_signalstatusmatrix','[') low = int(low[3] + low[7] + low[11] + low[15] + low[19] + low[23] + low[27] + low[31] + low[35] + low[39] + low[44] +low[49] + low[54]) for i in range(1, 17): if i < 15: _Command("hi8435_cfg wrDiscOut %s high" % str(i)) else: _Command("hi8435_cfg wrDiscOut %s high" % str(i)) high = _Command("arinc get_signalstatusmatrix", '#', 5) high = dleStr(high,'get_signalstatusmatrix','[') high = int(high[3] + high[7] + high[11] + high[15] + high[19] + high[23] + high[27] + high[31] + high[35] + high[39] +high[44] + high[49] + high[54]) log1=low+high for i in range(1, 17): if i < 15: _Command("hi8435_cfg wrDiscOut %s low" % str(i)) else: _Command("hi8435_cfg wrDiscOut %s low" % str(i)) low = _Command("arinc get_signalstatusmatrix", '#', 5) low = dleStr(low, 'get_signalstatusmatrix', '[') low = int(low[3] + low[7] + low[11] + low[15] + low[19] + low[23] + low[27] + low[31] + low[35] + low[39] + low[44] +low[49] + low[54]) log2=high+low if log1!=11 and log2!=11: _Fail('Discrete Check FAIL')

# 429检测 _Running(u"429检测") _Command("hi3593_c0_cfg setRx1BitRate highr") _Command("hi3593_c0_cfg setRx2BitRate highr") _Command("hi3593_c0_cfg setTxBitRate highr") _Command("hi3593_c1_cfg setRx1BitRate highr") _Command("hi3593_c1_cfg setRx2BitRate highr") _Command("hi3593_c1_cfg setTxBitRate highr")

if int(dleStr(_Command("ps | grep -c netlink_u_"), "", "[")) < 1: _Command("netlink_u_app &r", '#', 3) c = _Command("hi429_sendmsg_user_chip0 123 3r") if "0x42910001" not in c: _Fail(u"429 CHIP0 测试失败")

d = _Command("hi429_sendmsg_user_chip1 456 3r") if "0x42920001" not in d: _Fail(u"429 CHIP1 测试失败")

本文标签: 测试老化分享连接接收数据