📄 auto_test
字号:
#!/usr/bin/expect## Author: Michael Kang(blackfin.kang@gmail.com)# Purpose: autoTest all the testcases in the skyeye testsuite.#set TITLE "SkyEye Auto Test"puts "*********************************\r"puts "Start $TITLE\r"puts "*********************************\r"#set skyeye_penv(PWD)# add directory of all the test caseset path { at91/uclinux_rtl8019/ at91/uclinux_cs8900a at91/at91_with_framebuffer_touchscreen at91rm9200/2.6.x ep7312/2.6.x ep7312/ep7312_with_framebuffer_touchscreen_minigui ep9312/2.6.x s3c2410/2.4.18 s3c4510/ pxa/2.6.x pxa/with_flash_net_lcd pxa/pxa27x cs89712/ strongarm/ blackfin/}set timeout 180set case_num 1set failed_num 0set pass_num 0set report_date [exec date --iso-8601=date]# open a file as reportset file [open test_report_$report_date w]puts $file " SkyEye test report"puts $file "Date : [exec date]"puts $file " "set skyeye_sh { ./exec_skyeye.sh ./exec_skyeye_dbct.sh }foreach skyeye_element $skyeye_sh { foreach element $path { spawn $skyeye_element $element $env(PWD) expect { # we think when appear "command shell" , testcase is passed "shell" { puts $file "Case $case_num: $skyeye_element $element ...PASSED\n" incr pass_num } timeout { puts $file "Case $case_num: $skyeye_element $element ...FAILED\n" incr failed_num } } incr case_num system "killall skyeye" }}set total_num [expr $case_num-1]puts " \r"puts "Total $total_num , failed $failed_num , pass $pass_num "puts "\r$TITLE ............\r"# write to a txt file as reportputs $file "Total $total_num , failed $failed_num , pass $pass_num "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -