blob: 014a5d3c99e2faf9b2091e434a5cbd7c6e7b896b [file] [log] [blame]
Ash Wilson6791f4d2016-02-25 23:07:50 -06001#!/bin/bash
2
3TEST_DIR=`dirname "$0"`
Ash Wilson1c514982016-04-10 23:24:03 -07004
Ash Wilson4613c1d2016-04-10 23:48:35 -07005export AP_DECODE="grgsm_decode"
Piotr Krysik533f58a2016-04-11 22:20:35 +02006export CAPFILE="../../test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile"
Ash Wilson1c514982016-04-10 23:24:03 -07007export SHORTENED_CAPFILE="tmp.cfile"
Piotr Krysik533f58a2016-04-11 22:20:35 +02008export RESULT_EXPECTED="../fixtures/grgsm_decode_test1_expected"
Ash Wilson1c514982016-04-10 23:24:03 -07009export RESULT_OBTAINED="grgsm_decode_test1_result"
10export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m BCCH -t 0 -v "
Ash Wilson6791f4d2016-02-25 23:07:50 -060011echo "Testing with:"
12echo " $RUNLINE"
13gnuradio-companion --version
Ash Wilson4613c1d2016-04-10 23:48:35 -070014
Ash Wilson6791f4d2016-02-25 23:07:50 -060015cd $TEST_DIR
16cat $CAPFILE | head -c 6000000 > $SHORTENED_CAPFILE
Ash Wilson4613c1d2016-04-10 23:48:35 -070017
Ash Wilson6791f4d2016-02-25 23:07:50 -060018$RUNLINE | tail -n +4 | tee $RESULT_OBTAINED
19diff $RESULT_EXPECTED $RESULT_OBTAINED
20TEST_RESULT=$?
Ash Wilson4613c1d2016-04-10 23:48:35 -070021
Ash Wilson6791f4d2016-02-25 23:07:50 -060022rm $RESULT_OBTAINED
23rm $SHORTENED_CAPFILE
Ash Wilson4613c1d2016-04-10 23:48:35 -070024
Ash Wilson6791f4d2016-02-25 23:07:50 -060025if [ $TEST_RESULT == 0 ]
26then
27 echo " Result: PASSED"
28 exit 0
29else
30 echo " Result: FAILED"
31 exit 1
32fi