Exemple #1
0
def setup(product):
    SESSION["isMend"] = True
    # return  #测试版本下载,不合夹具
    global started
    if not started:
        started = True
        __getVersionDownloadBoard().operateClap(1)
Exemple #2
0
def finalFun(product):
    global finishedTestSlots
    finishedTestSlots += 1
    if finishedTestSlots  == len(PARAM["productSlots"].split(",")):
        # 所有槽位执行完
        global started
        started = False
        finishedTestSlots = 0
        __getVersionDownloadBoard().operateClap(2)
Exemple #3
0
def setup(product):
    SESSION["isMend"] = True
    # return  #测试版本下载,不合夹具
    global started
    if not started:
        started = True
        # __allSlotToSerial()
        if PARAM["clapOperate"] == "I":
            if IntegratedVatTrigger.INSTANCE is None:IntegratedVatTrigger()
            IntegratedVatTrigger.INSTANCE.closeClap()
        elif PARAM["clapOperate"] == "V":
            print 'close clap'
            __getVersionDownloadBoard().operateClap(1)
        __getVstChecker().prepareToTest()
    time.sleep(0.7)
Exemple #4
0
def T_01_downloadVersion_A(product):
    u"下载版本-下载VAT版本"
    vdb = __getVersionDownloadBoard()
    channel = int(product.productSlot)

    vdb.powerOn(channel,True)
    time.sleep(0.3)
    sum3Vot = 0
    for i in range(3): sum3Vot += vdb.readVoltage(channel)
	
    voltage = sum3Vot /3   #读3次,取平均
    current = (voltage / 4096.0 * 3.3)/8*1000 # 毫安	

    uiLog(u"槽位[%d]电流:%3f"%(channel,current))

    try:
        # 判断电压范围
        # if voltage > 200: raise TestItemFailException(failWeight = 10,message = u"电流过大[%d]或者没有放置单板"%voltage)
        if current > PARAM["currentLimit"]: raise TestItemFailException(failWeight = 10,message = u"电流过大[%d]或者没有放置单板"%current)
        vdb.resetEnable(channel,True)
        vdb.dataClockEnable(channel,True)
        try:
            #vdb.reset(int(product.productSlot))
            time.sleep(0.15)
            vdb.triggerDownload(channel)
        except Exception,e:
            # 第一次下载失败,那么复位一下,重试下载
            #uiLog(u"槽位[%d]第一次版本下载失败:%s"%(channel,str(e)))
            #vdb.reset(channel)
            #time.sleep(0.5)
            #vdb.triggerDownload(channel)
            raise e
    except TestItemFailException,e:
        raise e
Exemple #5
0
    finishedTestSlots += 1
    try:
        __getIVB().peripheralCtrl(product.productSlot).obuPowerCtrl(0x03) # OBU下电
        __getIVB().peripheralCtrl(product.productSlot).channelSelect(0x03)
    except IntegratedVATBoard.DeviceNoResponseException,e:
        pass
    if finishedTestSlots  == len(PARAM["productSlots"].split(",")):
        # 所有槽位执行完
        global started
        started = False
        finishedTestSlots = 0
        #time.sleep(1)
        if PARAM["clapOperate"] == "I":
            IntegratedVatTrigger.INSTANCE.openClap()
        elif PARAM["clapOperate"] == "V":
            __getVersionDownloadBoard().operateClap(2)


def T_01_downloadVersion_A(product):
    u"下载版本-下载VAT版本"
    vdb = __getVersionDownloadBoard()
    channel = int(product.productSlot)

    vdb.powerOn(channel,True)
    time.sleep(0.3)
    sum3Vot = 0
    for i in range(3): sum3Vot += vdb.readVoltage(channel)
	
    voltage = sum3Vot /3   #读3次,取平均
    current = (voltage / 4096.0 * 3.3)/8*1000 # 毫安