- First version of instrument regression tests
- sinqcom is the first version of a communication testing program for instruments
This commit is contained in:
82
insttest/marstest
Executable file
82
insttest/marstest
Executable file
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/tclsh
|
||||
#-------------------------------------------------------------------------
|
||||
# This is the regression test for SICS on the MARS instrument
|
||||
#
|
||||
# Mark Koennecke, November 2006
|
||||
#------------------------------------------------------------------------
|
||||
source sicstcldebug.tcl
|
||||
source insttestutil.tcl
|
||||
source marsinventory.tcl
|
||||
|
||||
#------ If there is another argument, test at localhost: for debugging...
|
||||
if {$argc > 0} {
|
||||
set instrument local
|
||||
} else {
|
||||
set instrument mars
|
||||
}
|
||||
|
||||
initSicsDebug $instrument
|
||||
config rights lnsmanager lnsSICSlns
|
||||
|
||||
set th [SICSValue th01]
|
||||
if {[string equal $instrument local]} {
|
||||
colldr tf 12
|
||||
}
|
||||
|
||||
#---------- configuration
|
||||
lappend notList chopperspeed snailphase masterphase rabbitphase fourphase
|
||||
lappend notList fivephase s1phase mphase s2phase s3phase s4phase mspeed
|
||||
|
||||
lappend commandList "count timer 2"
|
||||
lappend commandList "repeat 2"
|
||||
lappend commandList "wwwsics"
|
||||
lappend commandList "marsupdateinfo"
|
||||
lappend commandList "colldr th 86."
|
||||
|
||||
|
||||
exe upload
|
||||
exe append count timer 120
|
||||
exe append count timer 120
|
||||
exe forcesave insttestbatch.tcl
|
||||
|
||||
lappend interruptList "colldr th 77."
|
||||
lappend interruptList "count timer 120"
|
||||
lappend interruptList "exe insttestbatch.tcl"
|
||||
|
||||
|
||||
set par(inventory) $inventory
|
||||
set par(driveCommand) drive
|
||||
set par(motorList) $motors
|
||||
set par(notList) $notList
|
||||
set par(commandList) $commandList
|
||||
set par(interruptList) $interruptList
|
||||
set par(instrument) $instrument
|
||||
set par(user) lnsmanager
|
||||
set par(password) lnsSICSlns
|
||||
|
||||
#================= actually test =====================================
|
||||
set counters [runStandardTests par]
|
||||
|
||||
#--------- Test detection system
|
||||
puts stdout "Testing detector"
|
||||
set det 1
|
||||
count timer 600
|
||||
set tf [SICSValue "hm notimebin"]
|
||||
set counts [SICSValue "hm sum 0 24 0 $tf"]
|
||||
if {$counts <= 0} {
|
||||
set det 0
|
||||
}
|
||||
if {$det == 1} {
|
||||
puts stdout "Detector passed"
|
||||
} else {
|
||||
puts stdout "Check detector, found no noise after 10 minutes counting"
|
||||
}
|
||||
#--------- put detector back where it was
|
||||
colldr th $th
|
||||
|
||||
#------------ print a summary
|
||||
set inst [string toupper $instrument]
|
||||
puts stdout "Test Summary for $inst"
|
||||
printStandardSummary $counters
|
||||
puts stdout "Choppers NOT tested!!"
|
||||
|
Reference in New Issue
Block a user