aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsh Wilson <ash.d.wilson@gmail.com>2016-04-11 19:16:51 -0700
committerAsh Wilson <ash.d.wilson@gmail.com>2016-04-11 19:16:51 -0700
commitc084c5704e45be57e725d0a36d11372969e1a397 (patch)
tree352b89ad0ae948d3f26743778b3ca322c985c888
parent181b5dc4a37ee565b50e89c282e1b23fc6d7658e (diff)
parenta0340276a3b9993df9165e1d69bd01c496301393 (diff)
coalesce efforts
-rw-r--r--.travis.yml11
-rw-r--r--TESTING.md8
-rw-r--r--dockerfiles/Ubuntu15_pybombs.docker16
-rw-r--r--tests/dockerfiles/DebianJessie.docker (renamed from dockerfiles/DebianJessie.docker)0
-rw-r--r--tests/dockerfiles/Ubuntu_15_04.docker (renamed from dockerfiles/Ubuntu15.docker)5
-rw-r--r--tests/dockerfiles/Ubuntu_16_04.docker (renamed from dockerfiles/Ubuntu16.docker)3
-rw-r--r--tests/fixtures/grgsm_decode_test1_expected (renamed from test/fixtures/grgsm_decode_test1_expected)0
-rwxr-xr-xtests/scripts/decode.sh (renamed from test/tests/decode.sh)4
-rwxr-xr-x[-rw-r--r--]tests/scripts/scanner.sh (renamed from test/tests/integration.sh)6
9 files changed, 16 insertions, 37 deletions
diff --git a/.travis.yml b/.travis.yml
index 2803ba0..71398a5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,12 +3,9 @@ sudo: required
language: ruby
env:
- #- DOCKERFILE=dockerfiles/Ubuntu15_pybombs.docker IMGNAME=ubu15_pybombs-grgsm
- # - DOCKERFILE=dockerfiles/DebianJessie.docker IMGNAME=debjess-grgsm
- # - DOCKERFILE=dockerfiles/Ubuntu14.docker IMGNAME=ubu14-grgsm
- # - DOCKERFILE=dockerfiles/Ubuntu15.docker IMGNAME=ubu15-grgsm
- # - DOCKERFILE=dockerfiles/Kali.docker IMGNAME=kali-grgsm
- - DOCKERFILE=dockerfiles/Ubuntu16.docker IMGNAME=ubu16-grgsm
+ #- DOCKERFILE=tests/dockerfiles/DebianJessie.docker IMGNAME=debjess-grgsm
+ #- DOCKERFILE=tests/dockerfiles/Ubuntu_15_04.docker IMGNAME=ubu15.04-grgsm
+ - DOCKERFILE=tests/dockerfiles/Ubuntu_16_04.docker IMGNAME=ubu16.04-grgsm
services:
- docker
@@ -17,4 +14,4 @@ before_install:
- cat $DOCKERFILE > Dockerfile ; docker build -t $IMGNAME .
script:
- - docker run -it --rm $IMGNAME /src/test/tests/decode.sh
+ - docker run -it --rm $IMGNAME /src/tests/scripts/decode.sh
diff --git a/TESTING.md b/TESTING.md
index a12b5ba..b51e647 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -2,14 +2,14 @@
## CI Testing
-CI testing currently consists of attempting to build gr-gsm as described in the .docker files located under gr-gsm/dockerfiles using travis-ci.org. If the build is successful, travis-ci will attempt to decode the test file located under gr-gsm/test_data and compare the results to this file: gr-gsm/test/fixtures/grgsm_decode_test1_expected. See the gr-gsm/test/tests/decode.sh file for details.
+CI testing currently consists of attempting to build gr-gsm as described in the .docker files located under gr-gsm/tests/dockerfiles using travis-ci.org. If the build is successful, travis-ci will attempt to decode the test file located under gr-gsm/test_data and compare the results to this file: gr-gsm/tests/fixtures/grgsm_decode_test1_expected. See the gr-gsm/tests/scripts/decode.sh file for details.
## Integration testing
-Integration testing:
+Integration testing with use of the grgsm_scanner application:
* Make sure that your RTL SDR dongle is plugged into the system and if you're running on Mac, you need to have the dongle accessible to the VirtualBox VM that's running Docker.
-* cd gr-gsm/test/tests
-* . .integration.sh
+* cd gr-gsm/tests/scripts
+* scanner.sh
This will copy the entire contents of the currently checked out branch of gr-gsm to a temp folder, and attempt to build the docker images according to the definitions in the .docker files located under gr-gsm/dockerfiles.
Once the images are created, the script instantiates a container for testing the rtlsdr scanner on each band, against each Docker image built. This can take quite a while. If you're running on Mac, consider using the ```caffeinate``` command to keep your machine from sleeping.
diff --git a/dockerfiles/Ubuntu15_pybombs.docker b/dockerfiles/Ubuntu15_pybombs.docker
deleted file mode 100644
index 9c2a5f0..0000000
--- a/dockerfiles/Ubuntu15_pybombs.docker
+++ /dev/null
@@ -1,16 +0,0 @@
-FROM ubuntu:15.04
-MAINTAINER Piotr Krysik
-
-# We know it's going to foul up, so we run this install separately and then ...fix... dpkg status
-RUN apt-get update && apt-get install -y uhd-host || \
- sed -i "s/Status: install ok half-configured/Status: install ok installed/g" /var/lib/dpkg/status
-
-
-RUN apt-get update && apt-get install -y git python-pip
-RUN pip install PyBOMBS
-RUN pybombs prefix init /usr/local -a default_prx
-RUN pybombs config default_prefix default_prx
-RUN pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git
-RUN pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git
-RUN pybombs -v install gr-gsm
-RUN ldconfig
diff --git a/dockerfiles/DebianJessie.docker b/tests/dockerfiles/DebianJessie.docker
index 538f105..538f105 100644
--- a/dockerfiles/DebianJessie.docker
+++ b/tests/dockerfiles/DebianJessie.docker
diff --git a/dockerfiles/Ubuntu15.docker b/tests/dockerfiles/Ubuntu_15_04.docker
index f3a49df..74304bd 100644
--- a/dockerfiles/Ubuntu15.docker
+++ b/tests/dockerfiles/Ubuntu_15_04.docker
@@ -2,15 +2,14 @@ FROM ubuntu:15.04
MAINTAINER Ash Wilson
ENV OSMOSDR_GIT="git://git.osmocom.org/libosmocore.git"
-#ENV OSMOCORE_TAG=0.6.3
-ENV OSMOCORE_TAG=0.6.6
+ENV OSMOCORE_TAG=0.6.3
# We know it's going to foul up, so we run this install separately and then ...fix... dpkg status
RUN apt-get update && apt-get install -y uhd-host || \
sed -i "s/Status: install ok half-configured/Status: install ok installed/g" /var/lib/dpkg/status
-RUN apt-get update && apt-get install -y \
+RUN apt-get install -y \
git \
python \
python-scipy \
diff --git a/dockerfiles/Ubuntu16.docker b/tests/dockerfiles/Ubuntu_16_04.docker
index bf4eb2c..2340fed 100644
--- a/dockerfiles/Ubuntu16.docker
+++ b/tests/dockerfiles/Ubuntu_16_04.docker
@@ -5,7 +5,7 @@ MAINTAINER Ash Wilson
RUN apt-get update && apt-get install -y uhd-host || \
sed -i "s/Status: install ok half-configured/Status: install ok installed/g" /var/lib/dpkg/status
-RUN apt-get update && apt-get install -y \
+RUN apt-get install -y \
git \
python \
python-scipy \
@@ -50,7 +50,6 @@ RUN apt-get update && apt-get install -y \
unzip \
libosmocore-dev
-
COPY ./ /src/
RUN mkdir /root/.gnuradio/
diff --git a/test/fixtures/grgsm_decode_test1_expected b/tests/fixtures/grgsm_decode_test1_expected
index eb78bb9..eb78bb9 100644
--- a/test/fixtures/grgsm_decode_test1_expected
+++ b/tests/fixtures/grgsm_decode_test1_expected
diff --git a/test/tests/decode.sh b/tests/scripts/decode.sh
index 62a3df2..014a5d3 100755
--- a/test/tests/decode.sh
+++ b/tests/scripts/decode.sh
@@ -3,9 +3,9 @@
TEST_DIR=`dirname "$0"`
export AP_DECODE="grgsm_decode"
-export CAPFILE="/src/test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile"
+export CAPFILE="../../test_data/vf_call6_a725_d174_g5_Kc1EF00BAB3BAC7002.cfile"
export SHORTENED_CAPFILE="tmp.cfile"
-export RESULT_EXPECTED="/src/test/fixtures/grgsm_decode_test1_expected"
+export RESULT_EXPECTED="../fixtures/grgsm_decode_test1_expected"
export RESULT_OBTAINED="grgsm_decode_test1_result"
export RUNLINE="$AP_DECODE -c $SHORTENED_CAPFILE -s $((100000000/174)) -m BCCH -t 0 -v "
echo "Testing with:"
diff --git a/test/tests/integration.sh b/tests/scripts/scanner.sh
index 04513d9..4b1bfdd 100644..100755
--- a/test/tests/integration.sh
+++ b/tests/scripts/scanner.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# This script runs integration tests for gnuradio.
+# This script runs integration tests for grgsm_scanner.
# Run it fron the enclosing directory.
export TEST_IMAGE_NAMES=()
export TEST_SCAN_BANDS=(P-GSM DCS1800 PCS1900 E-GSM R-GSM GSM450 GSM480 GSM850)
@@ -13,7 +13,7 @@ cp -R $GR_SRC_DIR $TEMP_DIR
cd $TEMP_DIR/gr-gsm
-export DOCKERFILE_LIST=($TEMP_DIR/gr-gsm/dockerfiles/*.docker)
+export DOCKERFILE_LIST=($TEMP_DIR/gr-gsm/tests/dockerfiles/*.docker)
for DOCKERFILE in ${DOCKERFILE_LIST[*]}
do
@@ -29,7 +29,7 @@ done
for BAND in ${TEST_SCAN_BANDS[*]}
do
- export SCAN_COMMAND="/usr/bin/python /usr/local/bin/airprobe_rtlsdr_scanner.py -b `echo $BAND` -v"
+ export SCAN_COMMAND="/usr/bin/python /usr/local/bin/grgsm_scanner -b `echo $BAND` -v"
for IMG in ${TEST_IMAGE_NAMES[*]}
do
echo "Now we test: $SCAN_COMMAND on $IMG"