- First version of instrument regression tests

- sinqcom is the first version of a communication testing program
  for instruments
This commit is contained in:
koennecke
2006-11-24 15:53:51 +00:00
parent 8a1a808fe5
commit 2fe5e85193
19 changed files with 1967 additions and 0 deletions

88
insttest/sanstest Executable file
View File

@ -0,0 +1,88 @@
#!/usr/bin/tclsh
#-------------------------------------------------------------------------
# This is the regression test for SICS on the SANS instrument
#
# Mark Koennecke, November 2006
#------------------------------------------------------------------------
source sicstcldebug.tcl
source insttestutil.tcl
source sansinventory.tcl
#------ If there is another argument, test at localhost: for debugging...
if {$argc > 0} {
set instrument local
} else {
set instrument sans
}
initSicsDebug $instrument
config rights lnsmanager lnsSICSlns
#--------- remember detector position...
set detpos [SICSValue detectorx]
bsin
drive detectorx 3.
#---------- configuration
set notList [list nvs nvswatch lambda]
lappend commandList "count timer 2"
lappend commandList "repeat 2"
lappend commandList "coll 3"
lappend commandList "testVarValue coll 3"
lappend commandList "coll 18"
lappend commandList "testVarValue coll 18"
lappend commandList "bsout"
lappend commandList "bsin"
lappend commandList "att 1"
lappend commandList "wwwsics"
lappend commandList "statusinfo"
lappend commandList "hmframe 0"
lappend commandList "fileframe 0 0"
exe upload
exe append drive detectorx 3.
exe append drive detectorx 18.
exe forcesave insttestbatch.tcl
lappend interruptList "drive detectorx 18."
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 counts [SICSValue "banana sum 0 128 0 128"]
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
drive detectorx $detpos
#------------ print a summary
set inst [string toupper $instrument]
puts stdout "Test Summary for $inst"
printStandardSummary $counters
puts stdout "Velocity selector NOT tested!!"