瀏覽代碼

add some prompt

Joe 1 天之前
父節點
當前提交
375704965a
共有 3 個文件被更改,包括 20 次插入4 次删除
  1. 18 3
      python_test/test_function.py
  2. 二進制
      python_test/test_function.pyc
  3. 2 1
      python_test/testplan.csv

+ 18 - 3
python_test/test_function.py

@@ -130,7 +130,7 @@ def step4_routine(context):
 
 def step5_routine(context):
     # hdd_version
-    context.print1("==SubTest: 检查HDD硬盘版本号  -  Titem_6")
+    context.print1("==SubTest: 检查SSD硬盘版本号  -  Titem_6")
     context.print1("-:) sh hdd-ver.sh")
     b = os.popen("sh hdd-ver.sh").read().strip()
     a = os.popen("cat /sys/block/nvme0n1/device/firmware_rev").read().replace('\n', '').replace('\r', '').strip()
@@ -163,7 +163,7 @@ def step7_routine(context):
     except ValueError:
         return False, "Invalid output: {}".format(a)
 
-    if 2900 <= a_int <= 4000:
+    if 2950 <= a_int <= 4000:
         return True, a_int
     else:
         return False, "FAIL " + a
@@ -1075,4 +1075,19 @@ def step47_routine(context):
     if a_int >= 1:
         return True, 'PASS-{}'.format(a)
     else:
-        return False, "FAIL " + "Error! No Device found!"
+        return False, "FAIL " + "Error! No Device found!"
+
+
+def step48_routine(context):
+    context.print1("==SubTest: 检查耳机基本功能测试  -  Titem_22")
+    context.print1("-:) Prompt, 请插上耳机继续测试")
+    tkMessageBox.showinfo("Prompt", "请插上耳机继续测试")
+    context.print1("-:) sh os-ver.sh speaker")
+    a = os.popen("sh os-ver.sh speaker").read().replace('\n', '').replace('\r', '').strip()
+    tkMessageBox.showinfo("Prompt", "请拔出耳机继续测试")
+    if tkMessageBox.askokcancel("PASS?", "测试耳机是否正常并拔出耳机."):
+    # if ask_choice_with_timeout("PASS?", "测试数码管是否正常.",30):
+
+        return True, 'PASS'
+    else:
+        return False, "FAIL"

二進制
python_test/test_function.pyc


+ 2 - 1
python_test/testplan.csv

@@ -4,7 +4,7 @@ N,检查EC版本号,step2_routine,,,
 N,Read_SerialNumber,step42_routine,,,
 N,检查CPU测试,step3_routine,,,
 N,检查Memory内存版本号,step4_routine,,,
-N,检查HDD硬盘版本号,step5_routine,,,
+N,检查SSD硬盘版本号,step5_routine,,,
 N,检查OS操作系统版本号,step6_routine,,,
 N,RTC电池,step7_routine,,,
 N,USB基本功能测试,step8_routine,,,
@@ -18,6 +18,7 @@ N,Buzzer基本功能测试,step18_routine,,,
 N,Seven_Segment_Display_Test,step21_routine,,,
 N,检查相机基本功能测试,step43_routine,,,
 N,检查喇叭基本功能测试,step44_routine,,,
+N,检查耳机基本功能测试,step48_routine,,,
 N,Microphone_Test,step45_routine,,,
 N,检查gsensor基本功能测试,step27_routine,,,
 N,外置键盘测试C180,step35_routine,,,