def test_hardware(): from testlib.equip.nrpz11 import nrpz11 from testlib.equip.hp11713A import hp11713A from testlib.equip.sg6000l import SG6000L from config import test_config cfg = test_config() swt = hp11713A(host=cfg.get('SWTIP')) pmLoss = nrpz11(cfg.get('PMLOSS'), timeout=10) pmIso = nrpz11(cfg.get('PMISO'), timeout=10) sg = SG6000L(port=cfg.get('SGPORT')) # pmLoss.calibrate() # pmIso.calibrate() pmLoss.setoffset(0) pmIso.setoffset(0) tdata = Db(cfg.get('DBFILE'), cfg.get('DBTBL')) tdata.de_debug = 1 c = combiner(pmPwrLoss=pmLoss.avgPower, pmFreqLoss=pmLoss.setfreq, pmPwrIso=pmIso.avgPower, pmFreqIso=pmIso.setfreq, sgFreq=sg.setFreq, swtOn=swt.SwitchOn, swtOff=swt.SwitchOff, dbWrite=tdata.Entry) c.initialize() c.printCAL() c.testSequence(testSeq=c.Seq2X2) tdata.Close()
def test_db4x4(): from testlib.util.db import Db tdata = Db('nxntest.db', 'NXN_DB') tdata.de_debug = 1 c = combiner(dbWrite=tdata.Entry) c.testSequence( testSeq=c.Seq4X4) tdata.Close()
else: l = testLimits(limitsDict=limits4x4) testSeq = c.Seq4X4 PLog = PlexusLog(part_number=part_number, hwrev=hwrev, ccode=ccode, operatorID=opid, mac=serialnumber, product=model) c.testLimit = l.testLimit c.testSequence(testSeq=testSeq) test_time = gui.elapsedTime(1) db.Entry(str(int(test_time)), 'test_time') gui.completeProgressBar() gui.BumpOdometer() ErrMsgs = l.errMsgs() if len(ErrMsgs) > 2: db.Entry(ErrMsgs, 'failures') db.Entry('FAIL', 'pass_fail') pass_fail = 'FAIL' StatusWindow(gui, "Test Status -- %s" % serialnumber, "FAIL", ErrMsgs) else: db.Entry('PASS', 'pass_fail') StatusWindow(gui, "Test Status -- %s" % serialnumber, "PASS", ErrMsgs) pass_fail = "PASS" PLog.log_data(pass_fail, ErrMsgs) db.Close()