Skip to content
Snippets Groups Projects

Add a new test with odd number for triggers and fix the atteanuation test for channel 8

Merged Simon Rose requested to merge dev_test2 into master
1 file
+ 19
3
Compare changes
  • Side-by-side
  • Inline
+ 19
3
@@ -47,12 +47,12 @@ echo 'Test in INIT state'
run "state_change $LLRF_INSTANCE RESET"
run "state_change $LLRF_INSTANCE INIT"
# Use only integers for testing of attenuation range 1-31
# Use only integers for testing of attenuation range 1-30 (for channels 0-7) and 1-15 (for channel 8)
# Note this excludes fractional attenuation values in the testing but for now the simplicity with worth the limited functionality testing.
for i in `seq 0 8`
do
attVal=$(( 1 + $RANDOM % 30 + 1 / (1 + $i / 8) ))
attVal=$(( 1 + $RANDOM % 30 / (1 + $i / 8) ))
run "set_att $LLRF_INSTANCE $slot $i $attVal"
done
@@ -64,7 +64,7 @@ run "state_change $LLRF_INSTANCE ON"
for i in `seq 0 8`;
do
attVal=$(( 1 + $RANDOM % 30 + 1 / (1 + $i / 8) ))
attVal=$(( 1 + $RANDOM % 30 / (1 + $i / 8) ))
run "set_att $LLRF_INSTANCE $slot $i $attVal"
done
@@ -92,6 +92,22 @@ done
result="$(caget -t $LLRF_INSTANCE:PULSEDONECNT)"
run "check $result 50 'Test simulating backplane triggers'"
run "state_change $LLRF_INSTANCE RESET"
run "state_change $LLRF_INSTANCE INIT"
run "state_change $LLRF_INSTANCE ON"
for i in `seq 1 49`
do
echo "Beam Pulse $i"
sis8300drv_reg /dev/sis8300-$slot 0x404 -w 0x20
sis8300drv_reg /dev/sis8300-$slot 0x404 -w 0x40
sis8300drv_reg /dev/sis8300-$slot 0x404 -w 0x80
usleep 100000
done
result="$(caget -t $LLRF_INSTANCE:PULSEDONECNT)"
run "check $result 49 'Test simulating backplane triggers'"
echo 'Revert to INIT state'
run "state_change $LLRF_INSTANCE RESET"
run "state_change $LLRF_INSTANCE INIT"
Loading