Skip to content
Snippets Groups Projects
Unverified Commit dd1bb811 authored by ThomasFayESS's avatar ThomasFayESS Committed by GitHub
Browse files

Merge pull request #14 from icshwi/dev_test2

Add a new test with odd number for triggers and fix the atteanuation test for channel 8
parents c5da7a21 8097b0da
No related branches found
No related tags found
No related merge requests found
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment