EasyManua.ls Logo

COBHAM GRMON3 - Page 38

COBHAM GRMON3
239 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GRMON3-UM
June 2019, Version 3.1.0
38 www.cobham.com/gaisler
proc dumpstate {} {
bt; thread info; reg; inst 256; ahb 256; info reg
}
proc testprog {tname} {
global nfail
puts "### TEST $tname BEGIN"
load $tname
set tstart [clock seconds]
set results [run]
set tend [clock seconds]
puts [format "### Test executed %d seconds" [expr $tend - $tstart]]
set exec_ok 0
foreach result $results {
if {$result == "SIGTERM"} {
set exec_ok 1
}
}
if {$exec_ok == 1} {
puts "### PASS: $tname"
} else {
incr nfail 1
puts "### FAIL: $tname ($results)"
dumpstate
}
puts "### TEST $tname END"
}
proc printsummary {} {
global nfail
if {0 == $nfail} {
puts "### SUMMARY: ALL TESTS PASSED"
} else {
puts "### SUMMARY: $nfail TEST(S) FAILED"
}
}
after 2000
testprog test000.elf
testprog test001.elf
testprog test002.elf
printsummary
exit

Table of Contents