summaryrefslogtreecommitdiffstats
path: root/tests/run-and-decode-test.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2014-03-19 23:12:31 +0100
committerSuren A. Chilingaryan <csa@suren.me>2014-03-19 23:12:31 +0100
commitef4f563559f195672d07114670a461a7c55ea22b (patch)
tree300e583a062fd7fe017d59fc68edef5d84184a85 /tests/run-and-decode-test.sh
parent3b410e54d3925a903adb2cc479177afc579c7679 (diff)
downloadipecamera-ef4f563559f195672d07114670a461a7c55ea22b.tar.gz
ipecamera-ef4f563559f195672d07114670a461a7c55ea22b.tar.bz2
ipecamera-ef4f563559f195672d07114670a461a7c55ea22b.tar.xz
ipecamera-ef4f563559f195672d07114670a461a7c55ea22b.zip
Add HEB scripts and re-organize the structure
Diffstat (limited to 'tests/run-and-decode-test.sh')
-rwxr-xr-xtests/run-and-decode-test.sh103
1 files changed, 0 insertions, 103 deletions
diff --git a/tests/run-and-decode-test.sh b/tests/run-and-decode-test.sh
deleted file mode 100755
index 5bf6513..0000000
--- a/tests/run-and-decode-test.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#! /bin/bash
-
-location=/mnt/fast/
-#location="./"
-duration=10000000
-wait_frame=1000000
-
-TESTS_PATH="`dirname \"$0\"`"
-TESTS_PATH="`( cd \"$TESTS_PATH\" && pwd )`"
-
-function pci {
- PCILIB_PATH=$TESTS_PATH/..
- LD_LIBRARY_PATH="$PCILIB_PATH" $PCILIB_PATH/pci $*
-}
-
-function stop {
- usleep $duration
- pci -w control 0x201 &> /dev/null
-}
-
-function reset {
- pci -r 0x9000 -s 256 > $1.status
- $TESTS_PATH/ipecamera/Reset_Init_all_reg_10bit.sh &> $1.reset
-}
-
-
-$TESTS_PATH/ipecamera/Reset_Init_all_reg_10bit.sh &> /dev/null
-/root/pcitool/tests/frame.sh &> /dev/null
-rm -f bench.out
-
-pci --stop-dma
-pci --start-dma dma1
-
-
-pci -r dma1 -s 16777216 --multipacket -o /dev/null &> /dev/null
-
-pci -r dma1 -s 1 | grep -i "Error (62)" &> /dev/null
-if [ $? -ne 0 ]; then
- echo "There is data on dma..."
- exit
-fi
-
-echo "Starting ... "
-
-decode_failures=0
-failures=0
-failed=0
-frames=0
-fpga_failures=0
-cmosis_failures=0
-frame_rate_failures=0
-
-iter=0
-while [ 1 ]; do
- pci -w control 0xa01 &> /dev/null
- stop &
-
- output="$location/test$iter.out"
- rm -f $output
- pci -r dma1 -o $output --wait --multipacket -t $wait_frame &> /dev/null
-
- killall -9 usleep &> /dev/null
- usleep 100000
- pci -w control 0x201 &> /dev/null
-
- if [ -f $output ]; then
- result=`ipedec -d -v --continue $output 2>&1 | grep -iE "failed|decoded"`
- cur_failed=`echo $result | wc -l`
- cur_decoded=`echo $result | tail -n 1 | grep -i decoded`
- if [ $? -ne 0 -o $cur_failed -eq 0 ]; then
- ipedec -d -v --continue $output > $output.decode
- decode_failures=$(($decode_failures + 1))
- reset $output
- else
- cur_failed=$(($cur_failed - 1))
- cur_frames=`echo $cur_decoded | cut -f 2 -d ' '`
- failed=$(($failed + $cur_failed))
- frames=$(($frames + $cur_frames))
- fpga_status=`pci -r 0x9054 | awk '{print $2;}' | cut -c 2`
- cmosis_status=`pci -r 0x9050 | awk '{print $2;}' | cut -c 3-4`
- if [ "$fpga_status" != "f" ]; then
- fpga_failures=$(($fpga_failures + 1))
- reset $output
- elif [ "$cmosis_status" == "7d" ]; then
- cmosis_failures=$(($cmosis_failures + 1))
- reset $output
- elif [ $cur_frames -lt 10 ]; then
- frame_rate_failures=$(($frame_rate_failures + 1))
- reset $output
- elif [ $cur_failed -eq 0 ]; then
- rm -f $output
- else
- reset $output
- fi
- fi
- else
- failures=$(($failures + 1))
- reset $output
- fi
-
- echo "Frames: $frames, Failed Frames: $failed, Failed Exchanges: $failures, Failed Decodings: $decode_failures, FPGA Failures: $fpga_failures, CMOSIS Failures: $cmosis_failures, Low Frame Rate: $frame_rate_failures"
- iter=`expr $iter + 1`
-done