Files
sicspsi/insttest/hrpttest
koennecke a24f56e7fb - Most instrument test files have been tested
- sinqcom undwerwent extension to cover more devices and is now more or
  less finished
2007-04-26 14:34:58 +00:00

82 lines
2.0 KiB
Tcl
Executable File

#!/usr/bin/tclsh
#-------------------------------------------------------------------------
# This is the regression test for SICS on the DMC instrument
#
# Mark Koennecke, November 2006
#------------------------------------------------------------------------
source sicstcldebug.tcl
source insttestutil.tcl
source hrptinventory.tcl
#------ If there is another argument, test at localhost: for debugging...
if {$argc > 0} {
set instrument local
} else {
set instrument hrpt
}
initSicsDebug $instrument
config rights lnsmanager lnsSICSlns
standardPrelude $instrument count
#---------- configuration
set notList [list nvs]
lappend commandList "counter setthreshold 1 0"
lappend commandList "count timer 2"
lappend commandList "repeat 2"
lappend commandList "counter setthreshold 1 3"
lappend commandList "radial start"
lappend commandList "radial stop"
lappend commandList "wwwsics"
set om [SICSValue a3]
exe upload
exe append drive a3 180.
exe append drive a3 $om
exe forcesave insttestbatch.tcl
lappend interruptList "drive a3 180"
lappend interruptList "count timer 120"
lappend interruptList "exe insttestbatch.tcl"
#---------- configure parameter array
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 counts [SICSValue "banana sum 0 1600"]
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"
}
#---------- drive sample rotation back
drive a3 $om
standardRestore
#------------ print a summary
set inst [string toupper $instrument]
puts stdout "Test Summary for $inst"
printStandardSummary $counters