blob: 89509525afd73cdfcecd1f43e5eddfe713cc312e [file] [log] [blame]
Ash Wilson6791f4d2016-02-25 23:07:50 -06001#!/bin/bash
2
3TEST_DIR=`dirname "$0"`
4export AP_DECODE="grgsm_decode"
Ash Wilson1c514982016-04-10 23:24:03 -07005#export CAPFILE="vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile"
6#export TEST_DATA_DIRECTORY="/src/test_data/"
7#export TEST_FIXTURES_DIRECTORY="/src/test/fixtures"
8#export RUNLINE="$AP_DECODE -c $CAPFILE -s $((100000000/174)) -a 725 -m BCCH -t 0 -v "
9
10export CAPFILE="../../test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile"
11export SHORTENED_CAPFILE="tmp.cfile"
Ash Wilson553f26a2016-04-10 23:34:40 -070012export RESULT_EXPECTED="../fixtures/grgsm_decode_test1_expected"
Ash Wilson1c514982016-04-10 23:24:03 -070013export RESULT_OBTAINED="grgsm_decode_test1_result"
14export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m BCCH -t 0 -v "
15
Ash Wilson6791f4d2016-02-25 23:07:50 -060016echo "Testing with:"
17echo " $RUNLINE"
18gnuradio-companion --version
19cd $TEST_DIR
20cat $CAPFILE | head -c 6000000 > $SHORTENED_CAPFILE
21$RUNLINE | tail -n +4 | tee $RESULT_OBTAINED
22diff $RESULT_EXPECTED $RESULT_OBTAINED
23TEST_RESULT=$?
24rm $RESULT_OBTAINED
25rm $SHORTENED_CAPFILE
26if [ $TEST_RESULT == 0 ]
27then
28 echo " Result: PASSED"
29 exit 0
30else
31 echo " Result: FAILED"
32 exit 1
33fi