1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/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 case
set 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 180
set case_num 1
set failed_num 0
set pass_num 0
set report_date [exec date --iso-8601=date]
# open a file as report
set 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 report
puts $file "Total $total_num , failed $failed_num , pass $pass_num "
|