- First version of instrument regression tests
- sinqcom is the first version of a communication testing program for instruments
This commit is contained in:
78
insttest/hrpttest
Executable file
78
insttest/hrpttest
Executable file
@ -0,0 +1,78 @@
|
||||
#!/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
|
||||
|
||||
#---------- 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
|
||||
|
||||
#------------ print a summary
|
||||
set inst [string toupper $instrument]
|
||||
puts stdout "Test Summary for $inst"
|
||||
printStandardSummary $counters
|
||||
|
||||
|
Reference in New Issue
Block a user