| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046 |
- #!/usr/bin/python
- #_*_ coding: utf-8 _*_
- from Tkinter import *
- import sys
- import os
- import subprocess
- import time
- import ttk
- import tkMessageBox
- import threading
- import csv
- import subprocess
- from datetime import datetime
- # declaring global variables
- script_ver='C180-C-C7-v1.2'
- log_file='./Logs/temp.txt'
- log1_buffer = ""
- step_status = ['x', 'ns', 'ns']
- result_msg = []
- # 'x' = don't care
- # 'ns' = not started
- # 'p' = passed
- # 'f' = failed
- # 'r' = running
- test_channel = ['1', '6', '11']
- device_info={}
- params_dict = {}
- params_dict['path_loss'] = '25'
- params_dict['wave_file'] = './11b_waveforms/wave11rc_1000.mod'
- params_dict['per_limit'] = '92'
- params_dict['SA_RSSI'] = '-80'
- params_dict['BTOn_RSSI']='-30'
- ###########################################################################
- class IO_process:
-
- def __init__(self, log_file_path):
- # log_file_path is the absolute path of the log file
- self.log_file = log_file_path
- self.line_count = 0
-
- def read_file(self):
- try:
- f = open(self.log_file,'r') # open file to read
- flag = 0
- for i, line in enumerate(f):
- if i == self.line_count: # if reached the correct line
- self.line_count += 1
- flag = 1
- #print self.line_count
- break
- f.close()
- if flag == 1:
- return line.rstrip('\r') # get rid of the newline character
- else:
- return ""
- except:
- return ""
-
- def empty_file(self):
- f = open(self.log_file,'w')
- f.close()
-
- def reset_counter(self):
- self.line_count = 0
- ###########################################################################
- def write_log_to_file(content):
- curr_time=time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
- log_dir = "./Logs/"
- log_file = "log_" + curr_time + ".txt"
- log_file_location = log_dir + log_file
- file = open(log_file_location,'a') # open file to append
- file.write(str(content) + '\n')
- file.close()
- ###########################################################################
- def print1(string,newline=0):
- global log1_buffer
- if newline == 0: # if user doesn't want to insert a line feed
- log1_buffer += "\n" + str(string)
- elif newline == 1: # if user wants to insert a line feed
- log1_buffer += "\n" + str(string) + "\n"
-
- ###########################################################################
- def step1_routine():
- # bios_version
- global step_status
- global result_msg
- step_num = 1
- step_status[step_num] = 'r' # running
-
- print1("\nstep1----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
- time.sleep(1)
- a = os.popen("sh os-ver.sh bios").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- if len(a) == 0:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- else:
- print1("Success! Device found! Rsync completed!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
-
- ###########################################################################
- def step2_routine():
- # bios release date
- global step_status
- global device_info
- global result_msg
- step_num = 2
- step_status[step_num] = 'r' # running
-
- print1("\nstep2----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
- #tkMessageBox.showinfo("Message Box", "PS2 keyboard/mouse test! Make sure PS2 keyboard and mouse are connected.")
- # read the data and analysis it.
- #a = os.popen('sh bios-release-date.sh').read()
- a = os.popen('sh os-ver.sh ec').read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- #a = os.system(r'./usb-location.sh')
- #a = subprocess.call(['./usb-location.sh'])
- print1("Step " + str(a) + " End...")
- if len(a) == 0:
- print1("Error! Standalone Sensitivity Fails!")
- print1("Please check the cable and antenna connection and try again!")
- step_status[step_num] = 'f' # failed
- else:
- step_status[step_num] = 'p'
- result_msg[step_num] = a
- ###########################################################################
- def step3_routine():
- # CPU type
- global step_status
- global result_msg
-
- step_num = 3
- step_status[step_num] = 'r' # running
-
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
-
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- a = os.popen("cat /proc/cpuinfo | grep \"model name\" | awk '{print $5}' | head -1").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- if len(a) == 0:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- else:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- ###########################################################################
- def step4_routine():
- # memory_version
- global step_status
- global result_msg
- step_num = 4
- step_status[step_num] = 'r' # running
-
- print1("\nFT----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
-
- a = os.popen("sh mem-ver.sh").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- if len(a) == 0:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- else:
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- ###########################################################################
- def step5_routine():
- # hdd_version
- global step_status
- global result_msg
- step_num = 5
- step_status[step_num] = 'r' # running
-
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
- b = os.popen("sh hdd-ver.sh").read().strip()
- a = os.popen("cat /sys/block/nvme0n1/device/firmware_rev").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- if len(a) == 0:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- else:
- print1(a)
- print1(b)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a+b
- ###########################################################################
- def step6_routine():
- # os_version
- global step_status
- global result_msg
-
- step_num = 6
- step_status[step_num] = 'r' # running
- time.sleep(3)
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
- a = os.popen("lsb_release -rs").read().strip()
- print1("")
- if a == "22.04":
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- ###########################################################################
- def step7_routine():
- global step_status
- global result_msg
- step_num = 7
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started RTC test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- #tkMessageBox.showinfo("Message Box", "RTC test! RTC电池测试.")
- a = os.popen("sh os-ver.sh RTCBATTERY").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if 3000 <= a_int <= 4000:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- #else:
- # print1("Error! No Device found!")
- # print1(a)
- # step_status[step_num] = 'f' # failed
- # result_msg[step_num] = a
- ###########################################################################
- def step8_routine():
- global step_status
- global result_msg
- step_num = 8
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 1:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step9_routine():
- # network speed cli
- global step_status
- global result_msg
-
- step_num = 9
- step_status[step_num] = 'r' # running
-
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- #tkMessageBox.showinfo("Message Box", "RJ45网口 test! 请插入网线到指定RJ45网口中,再点确定开始测试!.")
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started...")
-
- c = os.popen("ip link show | grep -c \"BROADCAST,MULTICAST,UP,LOWER_UP\"").read().strip()
- try:
- c_int = int(c)
- if c_int == 2:
- #print1("Error! No Device found!")
- print1(c)
- else:
- print1(c)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = c
- return;
- except ValueError:
- print1(c)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {c}"
- return;
-
- a = os.popen("sh os-ver.sh speedcliDownload").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- if len(a) == 0:
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- elif a == "Download: Upload:":
- print1("Error! no ethernet!")
- print1(a)
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- else:
- b = os.popen("ip link show | grep -c \"BROADCAST,MULTICAST,UP,LOWER_UP\"").read().strip()
- try:
- b_int = int(b)
- if b_int == 2:
- #print1("Error! No Device found!")
- print1(b)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- #print1(a)
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = a
- ###########################################################################
- def step10_routine():
- #serialA
- global step_status
- global result_msg
- step_num = 10
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started serialA test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
- a = os.popen("sh pcie.sh").read().strip()
- #time.sleep(1)
- time.sleep(1)
- a = os.popen("sh serialport-test.sh /dev/ttyWCH0").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH0")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH1").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH1")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH2").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH2")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH3").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH3")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH4").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH4")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH5").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH5")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH6").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH6")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH7").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH7")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- ###########################################################################
- def step11_routine():
- #serialB
- global step_status
- global result_msg
- step_num = 11
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started serialA test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
- a = os.popen("sh pcie.sh").read().strip()
- #time.sleep(1)
- time.sleep(1)
- a = os.popen("sh serialport-test.sh /dev/ttyWCH8").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH8")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH9").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH9")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH10").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyWCH10")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH11").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH11")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH12").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH12")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH13").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH13")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH14").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH14")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyWCH15").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyWCH15")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- ###########################################################################
- def step12_routine():
- #serialC
- global step_status
- global result_msg
- step_num = 12
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started serialA test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("sh serialport-test.sh /dev/ttyS0").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyS0")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS1").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyS1")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS2").read().strip()
- print1("\nsh sh serialport-test.sh /dev/ttyS2")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS3").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyS3")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS4").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyS4")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS5").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyS5")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS6").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyS6")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
- a = os.popen("sh serialport-test.sh /dev/ttyS7").read().strip()
- print1("\nsh serialport-test.sh /dev/ttyS7")
- try:
- a_int = int(a)
- if a_int == 1:
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- return;
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- return;
-
- ###########################################################################
- def step13_routine():
- #LCD Test
- global step_status
- global result_msg
- step_num = 13
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started lcd test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("./lcd/lcd/lcd_app | grep -c \"LCD test completed\"").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 1:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step14_routine():
- #LED Test
- global step_status
- global result_msg
- step_num = 14
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started LED test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("sh led-test.sh | tail -1").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 1:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step15_routine():
- global step_status
- global result_msg
- step_num = 15
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started 检查电池健康指示灯功能测试 test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("sh led-test.sh | tail -1").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 1:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step16_routine():
- global step_status
- global result_msg
- step_num = 16
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started 检查dip_switch功能测试 test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step17_routine():
- global step_status
- global result_msg
- step_num = 17
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started Console接口测试 test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step18_routine():
- global step_status
- global result_msg
- step_num = 18
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started Buzzer test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("sh beep.sh").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- if tkMessageBox.askokcancel("PASS?", "测试蜂鸣器是否正常."):
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'PASS'
- return;
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "FAIL"
- ###########################################################################
- def step19_routine():
- global step_status
- global result_msg
- step_num = 19
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started SATA_SSD基本功能测试 test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step20_routine():
- global step_status
- global result_msg
- step_num = 20
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step21_routine():
- global step_status
- global result_msg
- step_num = 21
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- #step_status[step_num] = 'p' # passed
- #result_msg[step_num] = 'AAPASS'
- #return;
-
- time.sleep(1)
- a = os.popen("sh seven_segment_display.sh").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- if tkMessageBox.askokcancel("PASS?", "测试数码管是否正常."):
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'PASS'
- return;
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "FAIL"
- ###########################################################################
- def step22_routine():
- global step_status
- global result_msg
- step_num = 22
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step23_routine():
- global step_status
- global result_msg
- step_num = 23
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step24_routine():
- global step_status
- global result_msg
- step_num = 24
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step25_routine():
- global step_status
- global result_msg
- step_num = 25
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step26_routine():
- global step_status
- global result_msg
- step_num = 26
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step27_routine():
- global step_status
- global result_msg
- step_num = 27
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started USB test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- a = os.popen("lsblk -d -o TRAN,NAME,SIZE | grep usb | wc -l").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if a_int == 2:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- print1(a)
- print1("ValueError! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- ###########################################################################
- def step28_routine():
- global step_status
- global result_msg
- step_num = 28
- step_status[step_num] = 'r' # running
- print1("\n----------------------------------------------------")
- print1("Step " + str(step_num) + " Started RTC test 1...")
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = 'AAPASS'
- return;
-
- time.sleep(1)
- #tkMessageBox.showinfo("Message Box", "RTC test! RTC电池测试.")
- a = os.popen("sh os-ver.sh RTCBATTERY").read()
- a = a.replace('\n','')
- a = a.replace('\r','')
- a = a.strip()
- print1("\n----------------------------------------------------")
- try:
- a_int = int(a)
- if 3000 <= a_int <= 4000:
- #print1("Error! No Device found!")
- print1(a)
- step_status[step_num] = 'p' # passed
- result_msg[step_num] = a
- else:
- print1(a)
- print1("Error! No Device found!")
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = a
- except ValueError:
- step_status[step_num] = 'f' # failed
- result_msg[step_num] = "Invalid output: {a}"
- #else:
- # print1("Error! No Device found!")
- # print1(a)
- # step_status[step_num] = 'f' # failed
- # result_msg[step_num] = a
- ###########################################################################
- """
- """
- #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- class MasterThread(threading.Thread):
- def __init__(self, guiobj):
- super(MasterThread, self).__init__()
-
- def run(self):
- global step_status
- global script_ver
- print1("X86 C180####################################################",1)
- print1(script_ver)
- step1_routine()
- if step_status[1] == 'p' or step_status[1] == 'f': # if step 1 passed
- step2_routine()
- if step_status[2] == 'p' or step_status[2] == 'f':
- step3_routine()
- if step_status[3] == 'p' or step_status[3] == 'f':
- step4_routine()
- if step_status[4] == 'p' or step_status[4] == 'f':
- step5_routine()
- if step_status[5] == 'p' or step_status[5] == 'f':
- step6_routine()
- if step_status[6] == 'p' or step_status[6] == 'f':
- step7_routine()
- if step_status[7] == 'p' or step_status[7] == 'f':
- step8_routine()
- if step_status[8] == 'p' or step_status[8] == 'f':
- step9_routine()
- if step_status[9] == 'p' or step_status[9] == 'f':
- step10_routine()
- if step_status[10] == 'p' or step_status[10] == 'f':
- step11_routine()
- if step_status[11] == 'p' or step_status[11] == 'f':
- step12_routine()
- if step_status[12] == 'p' or step_status[12] == 'f':
- step13_routine()
- if step_status[13] == 'p' or step_status[13] == 'f':
- step14_routine()
- if step_status[14] == 'p' or step_status[14] == 'f':
- step15_routine()
- if step_status[15] == 'p' or step_status[15] == 'f':
- step16_routine()
- if step_status[16] == 'p' or step_status[16] == 'f':
- step17_routine()
- if step_status[17] == 'p' or step_status[17] == 'f':
- step18_routine()
- if step_status[18] == 'p' or step_status[18] == 'f':
- step19_routine()
- if step_status[19] == 'p' or step_status[19] == 'f':
- step20_routine()
- if step_status[20] == 'p' or step_status[20] == 'f':
- step21_routine()
- if step_status[21] == 'p' or step_status[21] == 'f':
- step22_routine()
- if step_status[22] == 'p' or step_status[22] == 'f':
- step23_routine()
- if step_status[23] == 'p' or step_status[23] == 'f':
- step24_routine()
- if step_status[24] == 'p' or step_status[24] == 'f':
- step25_routine()
- if step_status[25] == 'p' or step_status[25] == 'f':
- step26_routine()
- if step_status[26] == 'p' or step_status[26] == 'f':
- step27_routine()
- if step_status[27] == 'p' or step_status[27] == 'f':
- step28_routine()
-
- print1("\n----------------------------------------------------")
- print1("Test concluded!")
- #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- class GuiThread(object):
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def __init__(self):
- global log_file
- global result_msg
- self.thread_list = {}
- self.running=False
- self.counter=0
- self.root = Tk()
- self.root.geometry("1800x1200")
-
- self.root.protocol("WM_DELETE_WINDOW", self.destroy) # when user closes the window
- self.root.title("WiPER: FT Simular Test")
-
- self.note1 = Label(self.root, text="Please press 'Start Test' to begin...", fg='blue')
- self.button1 = Button(self.root, text="Start Test", command=self.start)
- self.lbl = Label(self.root, text="NOT STARTED", width=15, bg='gray')
- self.lbl2 = Label(self.root, text="Device: ",width=20,bg="#C6EBFF")
-
- self.nb = ttk.Notebook(self.root, name='notebook')
-
- self.textframe1 = Frame(self.root)
- self.text1 = Text(self.textframe1)
- self.scrollbar1 = Scrollbar(self.textframe1)
-
- self.paramframe = Frame(self.root)
-
- self.lblframe = Frame(self.root)
- #self.step1_lbl1 = Label(self.lblframe, text="Step1: Check BIOS Version ", width=50)
- self.step1_lbl1 = Label(self.lblframe, text="Step1: 检查BIOS版本号 ", width=50)
- self.step2_lbl1 = Label(self.lblframe, text="Step2: 检查EC版本号 ", width=50)
- self.step3_lbl1 = Label(self.lblframe, text="Step3: 检查CPU测试 ", width=50)
- self.step4_lbl1 = Label(self.lblframe, text="Step4: 检查Memory内存版本号 ", width=50)
- self.step5_lbl1 = Label(self.lblframe, text="Step5: 检查HDD硬盘版本号 ", width=50)
- self.step6_lbl1 = Label(self.lblframe, text="Step6: 检查OS操作系统版本号 ", width=50)
- self.step7_lbl1 = Label(self.lblframe, text="Step7: RTC电池 ", width=50)
- self.step8_lbl1 = Label(self.lblframe, text="Step8: USB基本功能测试 ", width=50)
- self.step9_lbl1 = Label(self.lblframe, text="Step9: 检查网络在线速度测试 ", width=50)
- self.step10_lbl1 = Label(self.lblframe, text="Step10: 串口A基本功能测试 ", width=50)
- self.step11_lbl1 = Label(self.lblframe, text="Step11: 串口B本功能测试 ", width=50)
- self.step12_lbl1 = Label(self.lblframe, text="Step12: 串口C本功能测试 ", width=50)
- self.step13_lbl1 = Label(self.lblframe, text="Step13: lcd测试 ", width=50)
- self.step14_lbl1 = Label(self.lblframe, text="Step14: led测试 ", width=50)
- self.step15_lbl1 = Label(self.lblframe, text="Step15: 检查电池健康指示灯功能测试 ", width=50)
- self.step16_lbl1 = Label(self.lblframe, text="Step16: 检查dip_switch功能测试 ", width=50)
- self.step17_lbl1 = Label(self.lblframe, text="Step17: Console接口测试 ", width=50)
- self.step18_lbl1 = Label(self.lblframe, text="Step18: Buzzer基本功能测试 ", width=50)
- self.step19_lbl1 = Label(self.lblframe, text="Step19: SATA_SSD基本功能测试 ", width=50)
- self.step20_lbl1 = Label(self.lblframe, text="Step20: HeadBest_Test ", width=50)
- self.step21_lbl1 = Label(self.lblframe, text="Step21: Seven_Segment_Display_Test ", width=50)
- self.step22_lbl1 = Label(self.lblframe, text="Step22: CPUFan_Test ", width=50)
- self.step23_lbl1 = Label(self.lblframe, text="Step23: 检查带网口hub的usb3.0接口1号基本功能测试 ", width=50)
- self.step24_lbl1 = Label(self.lblframe, text="Step24: 检查带网口hub的usb3.0接口2号基本功能测试 ", width=50)
- self.step25_lbl1 = Label(self.lblframe, text="Step25: 电池健康指示灯/充电指示灯/心跳灯 ", width=50)
- self.step26_lbl1 = Label(self.lblframe, text="Step26: 外置键盘测试C180 ", width=50)
- self.step27_lbl1 = Label(self.lblframe, text="Step27: 触摸板测试C180 ", width=50)
- self.step28_lbl1 = Label(self.lblframe, text="Step28: SYSFan_Test ", width=50)
- self.step1_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step2_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step3_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step4_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step5_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step6_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step7_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step8_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step9_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step10_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step11_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step12_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step13_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step14_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step15_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step16_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step17_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step18_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step19_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step20_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step21_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step22_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step23_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step24_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step25_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step26_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step27_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
- self.step28_lbl2 = Label(self.lblframe, text="NOT STARTED", bg='gray', width=50)
-
-
- self.step_lbl_list = []
- self.step_lbl_list.append('x') # don't care
- self.step_lbl_list.append(self.step1_lbl2)
- self.step_lbl_list.append(self.step2_lbl2)
- self.step_lbl_list.append(self.step3_lbl2)
- self.step_lbl_list.append(self.step4_lbl2)
- self.step_lbl_list.append(self.step5_lbl2)
- self.step_lbl_list.append(self.step6_lbl2)
- self.step_lbl_list.append(self.step7_lbl2)
- self.step_lbl_list.append(self.step8_lbl2)
- self.step_lbl_list.append(self.step9_lbl2)
- self.step_lbl_list.append(self.step10_lbl2)
- self.step_lbl_list.append(self.step11_lbl2)
- self.step_lbl_list.append(self.step12_lbl2)
- self.step_lbl_list.append(self.step13_lbl2)
- self.step_lbl_list.append(self.step14_lbl2)
- self.step_lbl_list.append(self.step15_lbl2)
- self.step_lbl_list.append(self.step16_lbl2)
- self.step_lbl_list.append(self.step17_lbl2)
- self.step_lbl_list.append(self.step18_lbl2)
- self.step_lbl_list.append(self.step19_lbl2)
- self.step_lbl_list.append(self.step20_lbl2)
- self.step_lbl_list.append(self.step21_lbl2)
- self.step_lbl_list.append(self.step22_lbl2)
- self.step_lbl_list.append(self.step23_lbl2)
- self.step_lbl_list.append(self.step24_lbl2)
- self.step_lbl_list.append(self.step25_lbl2)
- self.step_lbl_list.append(self.step26_lbl2)
- self.step_lbl_list.append(self.step27_lbl2)
- self.step_lbl_list.append(self.step28_lbl2)
-
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
-
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
- result_msg.append('P')
-
- self.my_io_process = IO_process(log_file)
- self.readLog1()
- self.set_param_frame()
-
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def destroy(self):
- if tkMessageBox.askokcancel("Quit?", "Are you sure you want to quit?"):
- self.root.quit()
- def counter_label(self):
- def count():
- if self.running:
- global counter
-
- if self.counter==0: #66600
- display="Starting..."
- else:
- tt=datetime.fromtimestamp(self.counter)
- string=tt.strftime("%H:%M:%S")
- display=string
- self.note1.config(text=display)
- self.note1.after(1000, count)
- self.counter+=1
-
- count()
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def run(self):
-
- self.note1.pack()
- self.button1.pack(side=TOP, padx = 10, pady = 3)
- self.lbl.pack()
- self.lbl2.pack(fill=BOTH,expand=Y)
-
- self.scrollbar1.config(command=self.text1.yview)
- self.text1.config(yscrollcommand=self.scrollbar1.set)
- self.text1.pack(side=LEFT, fill=Y)
- self.scrollbar1.pack(side=RIGHT, fill=Y)
-
- self.step1_lbl1.grid(row=0,column=0,sticky=W)
- self.step2_lbl1.grid(row=1,column=0,sticky=W)
- self.step3_lbl1.grid(row=2,column=0,sticky=W)
- self.step4_lbl1.grid(row=3,column=0,sticky=W)
- self.step5_lbl1.grid(row=4,column=0,sticky=W)
- self.step6_lbl1.grid(row=5,column=0,sticky=W)
- self.step7_lbl1.grid(row=6,column=0,sticky=W)
- self.step8_lbl1.grid(row=7,column=0,sticky=W)
- self.step9_lbl1.grid(row=8,column=0,sticky=W)
- self.step10_lbl1.grid(row=9,column=0,sticky=W)
- self.step11_lbl1.grid(row=10,column=0,sticky=W)
- self.step12_lbl1.grid(row=11,column=0,sticky=W)
- self.step13_lbl1.grid(row=12,column=0,sticky=W)
- self.step14_lbl1.grid(row=13,column=0,sticky=W)
- self.step15_lbl1.grid(row=14,column=0,sticky=W)
- self.step16_lbl1.grid(row=15,column=0,sticky=W)
- self.step17_lbl1.grid(row=16,column=0,sticky=W)
- self.step18_lbl1.grid(row=17,column=0,sticky=W)
- self.step19_lbl1.grid(row=18,column=0,sticky=W)
- self.step20_lbl1.grid(row=19,column=0,sticky=W)
- self.step21_lbl1.grid(row=20,column=0,sticky=W)
- self.step22_lbl1.grid(row=21,column=0,sticky=W)
- self.step23_lbl1.grid(row=22,column=0,sticky=W)
- self.step24_lbl1.grid(row=23,column=0,sticky=W)
- self.step25_lbl1.grid(row=24,column=0,sticky=W)
- self.step26_lbl1.grid(row=25,column=0,sticky=W)
- self.step27_lbl1.grid(row=26,column=0,sticky=W)
- self.step28_lbl1.grid(row=27,column=0,sticky=W)
-
-
- self.step1_lbl2.grid(row=0,column=1,sticky=W)
- self.step2_lbl2.grid(row=1,column=1,sticky=W)
- self.step3_lbl2.grid(row=2,column=1,sticky=W)
- self.step4_lbl2.grid(row=3,column=1,sticky=W)
- self.step5_lbl2.grid(row=4,column=1,sticky=W)
- self.step6_lbl2.grid(row=5,column=1,sticky=W)
- self.step7_lbl2.grid(row=6,column=1,sticky=W)
- self.step8_lbl2.grid(row=7,column=1,sticky=W)
- self.step9_lbl2.grid(row=8,column=1,sticky=W)
- self.step10_lbl2.grid(row=9,column=1,sticky=W)
- self.step11_lbl2.grid(row=10,column=1,sticky=W)
- self.step12_lbl2.grid(row=11,column=1,sticky=W)
- self.step13_lbl2.grid(row=12,column=1,sticky=W)
- self.step14_lbl2.grid(row=13,column=1,sticky=W)
- self.step15_lbl2.grid(row=14,column=1,sticky=W)
- self.step16_lbl2.grid(row=15,column=1,sticky=W)
- self.step17_lbl2.grid(row=16,column=1,sticky=W)
- self.step18_lbl2.grid(row=17,column=1,sticky=W)
- self.step19_lbl2.grid(row=18,column=1,sticky=W)
- self.step20_lbl2.grid(row=19,column=1,sticky=W)
- self.step21_lbl2.grid(row=20,column=1,sticky=W)
- self.step22_lbl2.grid(row=21,column=1,sticky=W)
- self.step23_lbl2.grid(row=22,column=1,sticky=W)
- self.step24_lbl2.grid(row=23,column=1,sticky=W)
- self.step25_lbl2.grid(row=24,column=1,sticky=W)
- self.step26_lbl2.grid(row=25,column=1,sticky=W)
- self.step27_lbl2.grid(row=26,column=1,sticky=W)
- self.step28_lbl2.grid(row=27,column=1,sticky=W)
-
- self.lblframe.pack()
- self.textframe1.pack()
- self.paramframe.pack()
-
- self.nb.add(self.lblframe, text='Status')
- self.nb.add(self.textframe1, text='Log')
- self.nb.add(self.paramframe, text='Parameters')
- self.nb.enable_traversal() # enable keyboard traversal using Ctrl+Tab
- self.nb.pack(fill=BOTH, expand="true", padx=5, pady=1)
-
- self.root.mainloop()
-
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def readLog1(self):
- # This function periodically reads and empties the log buffer
-
- global log1_buffer
- if log1_buffer != "":
- self.text1.insert(END, log1_buffer)
-
- text = self.my_io_process.read_file()
- if text != "":
- self.text1.insert(END, text)
- if log1_buffer != "" or text != "": # if log buffer was populated
- self.text1.yview_pickplace("end") # move the scrollbar to the bottom
-
- log1_buffer = "" # empty the log buffer
- self.root.update() # update the screen
- self.root.after(100, self.readLog1)
- ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def set_param_frame(self):
- global params_dict
- self.L = []
- self.E = []
-
- count = 1
- for key,value in params_dict.iteritems():
- lbl = Label(self.paramframe, text=key)
- enty = Entry(self.paramframe, bd = 4)
- enty.delete(0, END)
- enty.insert(0,value)
- enty.config(state=DISABLED)
- lbl.grid(row=count, sticky=W)
- enty.grid(row=count, column=1)
- self.L.append(lbl)
- self.E.append(enty)
- count = count + 1
- ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def start(self):
-
- global step_status
- running=True
- #self.counter_label()
- #step_status = ['x', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns'] #
- step_status = ['x', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns', 'ns'] #
- self.button1.config(state=DISABLED) # disable the start button
- self.text1.delete('1.0', 'end') # delete the log
- self.my_io_process.reset_counter()
- self.thread_list['thread'] = MasterThread(self)
- self.thread_list['thread'].start()
- self.manage()
- self.manage_lblframe()
- ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def manage(self):
- # manage the pop-up dialog boxes
-
- global step_status
- total_no_of_steps = len(step_status) - 1
- flag = 0
- count = 0
- for i in range(1,total_no_of_steps+1):
- if step_status[i] == 'f': # if failed
- #tkMessageBox.showinfo("Message Box", "Error on Step " + str(i) + "! See Log for details.")
- print1("Error on Step " + str(i) + "! See Log for details.")
- flag = 1
- time.sleep(1)
- write_log_to_file(self.text1.get('1.0', 'end'))
- print1("Log written to the external txt file under ./Logs/")
- if step_status[i] == 'p' or step_status[i] == 'f': # if passed
- count = count + 1
-
- if count == total_no_of_steps: # if all the steps were successful
- flag = 1
- tkMessageBox.showinfo("Message Box", "Test succesfully done!") #Please safely remove the device from the chamber.
- print1("Test succesfully done! Please safely remove the device from the chamber.")
- time.sleep(1)
- write_log_to_file(self.text1.get('1.0', 'end'))
- print1("Log written to the external txt file under ./Logs/")
- self.running=False
- self.counter=0
-
- if flag == 0: # if not(any step failed or all steps passed)
- self.root.after(500, self.manage)
- else: # if any step has failed or if all the steps have passed
- self.button1.config(state=NORMAL) # enable the start button
- self.my_io_process.empty_file()
- return 0
- ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- def manage_lblframe(self):
- # manage the frame that displays the step-by-step status
- # manage the top-level status Label
-
- global step_status
- global device_info
- global result_msg
- total_no_of_steps = len(step_status) - 1
- try:
- SrNo = device_info['SrNo']
- string = "Device: " + SrNo
- self.lbl2.config(text=string)
- except:
- string = "Device: "
- self.lbl2.config(text=string)
-
- flag = 0
- count1 = 0
- count2 = 0
- count3 = 0
- #self.counter_label()
- for i in range (1,total_no_of_steps + 1):
- if step_status[i] == 'r': # if running
- self.step_lbl_list[i]["text"] = "RUNNING..."
- self.step_lbl_list[i]["bg"] = 'yellow'
- self.lbl.config(bg='yellow')
- self.lbl.config(text='RUNNING...')
- self.running=True
- #self.counter_label()
- if step_status[i] == 'p': # if passed
- self.step_lbl_list[i]["text"] = result_msg[i]
- self.step_lbl_list[i]["bg"] = 'green'
- count2 = count2 + 1
- if step_status[i] == 'f': # if failed
- self.step_lbl_list[i]["text"] = "ERROR!"
- self.step_lbl_list[i]["bg"] = 'red'
- self.lbl.config(bg='red')
- self.lbl.config(text='ERROR!')
- #flag = 1
- count3 = count3 + 1
- if step_status[i] == 'ns': # if not started
- self.step_lbl_list[i]["text"] = "NOT STARTED"
- self.step_lbl_list[i]["bg"] = 'gray'
- count1 = count1 + 1
-
- if count1 == total_no_of_steps: # if none of the steps have started
- self.lbl.config(bg='gray')
- self.lbl.config(text='NOT STARTED')
-
- if count2 == total_no_of_steps: # if all the steps are done
- self.lbl.config(bg='green')
- self.lbl.config(text='DONE!')
- flag = 1
-
- if flag == 0: # if there is no error and all the steps aren't done yet
- self.root.after(200, self.manage_lblframe)
- else: # if there is an error or if all the steps are done already
- device_info['SrNo'] = ""
- return 0
- ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- if __name__ == "__main__":
- g = GuiThread()
- g.run()
|