aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2019-09-12 02:09:40 +0300
committerPiotr Krysik <ptrkrysik@gmail.com>2020-02-14 15:14:59 +0000
commita7740ea515bec511ecdd0ff96fc7698891a81c11 (patch)
treeb8d64f5c7e79c62b9ac077a8cbdaeb79d0cc94a0
parent3e94c9c83a5b49ed56b8aaa5547c2a21241c9748 (diff)
tests: fix some shellcheck errors.
Execute "gnuradio-config-info --version" instead of "gnuradio-companion --version" Change-Id: Ia399324ae7a39e120e338c86d449d7c4d54bd866
-rwxr-xr-xtests/scripts/decode.sh9
-rwxr-xr-xtests/scripts/decrypt.sh9
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/scripts/decode.sh b/tests/scripts/decode.sh
index b982709..98aa165 100755
--- a/tests/scripts/decode.sh
+++ b/tests/scripts/decode.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-TEST_DIR=`dirname "$0"`
+TEST_DIR=$(dirname "$0")
# PYTHONPATH and LD_LIBRARY_PATH are needed on Fedora 26
#
@@ -18,11 +18,10 @@ export RESULT_OBTAINED="grgsm_decode_test1_result"
export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m BCCH -t 0 -v --ppm -10"
echo "Testing with:"
echo " $RUNLINE"
-#gnuradio 3.8 does not have --version parameter
-#gnuradio-companion --version
+gnuradio-config-info --version
-cd $TEST_DIR
-cat $CAPFILE | head -c 6000000 > $SHORTENED_CAPFILE
+cd "$TEST_DIR" || exit 1
+head -c 6000000 $CAPFILE > $SHORTENED_CAPFILE
$RUNLINE | grep -A 999999 "860933 1329237: 59 06 1a 8f 6d 18 10 80 00 00 00 00 00 00 00 00 00 00 00 78 b9 00 00" | tee $RESULT_OBTAINED
diff $RESULT_EXPECTED $RESULT_OBTAINED
diff --git a/tests/scripts/decrypt.sh b/tests/scripts/decrypt.sh
index 7f9bc60..824955f 100755
--- a/tests/scripts/decrypt.sh
+++ b/tests/scripts/decrypt.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-TEST_DIR=`dirname "$0"`
+TEST_DIR=$(dirname "$0")
# PYTHONPATH and LD_LIBRARY_PATH are needed on Fedora 26
#
@@ -18,11 +18,10 @@ export RESULT_OBTAINED="grgsm_decode_test1_result"
export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m SDCCH8 -t 1 -k 0x1E,0xF0,0x0B,0xAB,0x3B,0xAC,0x70,0x02 -v --ppm -10"
echo "Testing with:"
echo " $RUNLINE"
-#gnuradio 3.8 does not have --version parameter
-#gnuradio-companion --version
+gnuradio-config-info --version
-cd $TEST_DIR
-cat $CAPFILE | head -c -37000000 | head -c 35800000 > $SHORTENED_CAPFILE
+cd "$TEST_DIR" || exit 1
+head -c -37000000 $CAPFILE | head -c 35800000 > $SHORTENED_CAPFILE
$RUNLINE | grep -A 999999 "862210 1331352: 03 03 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b" | tee $RESULT_OBTAINED
diff -u $RESULT_EXPECTED $RESULT_OBTAINED