]> git.parisson.com Git - timeside.git/commitdiff
Travis-CI: Define 3 test environments (defautl, doc and command line interface)
authorThomas Fillon <thomas@parisson.com>
Fri, 16 Jan 2015 09:16:02 +0000 (10:16 +0100)
committerThomas Fillon <thomas@parisson.com>
Fri, 16 Jan 2015 10:00:26 +0000 (11:00 +0100)
.travis.yml
tests/test_scripts.sh

index 99439e0a40b964021ec6e644a32f5f3a59125458..29e8c6e163c8a47ea3be9bfc743951da273cd464 100644 (file)
@@ -1,43 +1,61 @@
 language: python
 python:
   - "2.7"
+
 virtualenv:
   system_site_packages: true
+
+
+env:
+  - TEST_TARGET=default  # Default unit test
+  - TEST_TARGET=cli      # Test for TimeSide command line interfaces
+  - TEST_TARGET=doc      # Test documentation and included doctest
+
+
 # command to prepare the system to install prerequisites or dependencies
 before_install:
- - sudo add-apt-repository -y ppa:donk/gstreamer
- - sudo apt-get -qq update
- - sudo apt-get install -qq python-numpy python-scipy python-matplotlib python-networkx python-setuptools
- - sudo apt-get install -qq libhdf5-serial-dev python-h5py python-tables
- - sudo apt-get install -qq python-gst0.10 gstreamer0.10-plugins-good gstreamer0.10-gnonlin gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad
 - sudo add-apt-repository -y ppa:donk/gstreamer
 - sudo apt-get -qq update
 - sudo apt-get install -qq python-numpy python-scipy python-matplotlib python-networkx python-setuptools
 - sudo apt-get install -qq libhdf5-serial-dev python-h5py python-tables
 - sudo apt-get install -qq python-gst0.10 gstreamer0.10-plugins-good gstreamer0.10-gnonlin gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad
 
-# command to install dependencies
+# Install TimeSide
 install:
- # - "pip install -r requirements.txt --use-mirrors"
- - python setup.py install
+  #- pip install -r requirements.txt
 - python setup.py install
 
 
 # command to run tests
 before_script:
- #- pip install coverage
- - pip install sphinx numpydoc
+  # -------------DEFAULT--------------------
+  - if [[ $TEST_TARGET == 'default' ]]; then
+       pip install coverage;
+    fi
+  # -------------DOC------------------------
+  - if [[ $TEST_TARGET == 'doc' ]]; then
+       pip install sphinx numpydoc;   
+    fi
+
 
 script:
- #- coverage run --source=timeside --omit=timeside/analyzer/aubio/aubio_*.py,timeside/analyzer/yaafe.py,timeside/analyzer/limsi_sad.py,timeside/analyzer/vamp_plugin.py setup.py test
- # --------------
- # Run Unit tests
- # -------------
- - python setup.py test
- # -------------
- # Check doctest
- # -------------
- - cd doc && make doctest
- # -----------
- # Test scripts
- # -----------
- - cd .. && source tests/test_scripts.sh
+  #coverage run --source=timeside --omit=timeside/analyzer/aubio/aubio_*.py,timeside/analyzer/yaafe.py,timeside/analyzer/limsi_sad.py,timeside/analyzer/vamp_plugin.py setup.py test
+  # -------------DEFAULT--------------------
+  - if [[ $TEST_TARGET == 'default' ]]; then
+       python setup.py test;
+    fi
+  # -------------DOC------------------------
+  - if [[ $TEST_TARGET == 'doc' ]]; then
+       cd doc;
+       make html;
+       make doctest;
+       cd ..;
+    fi
+  # -------------CLI-------------------------
+  - if [[ $TEST_TARGET == 'cli' ]]; then
+       ./tests/test_scripts.sh;
+    fi
 
 after_success:
  #- pip install coveralls
- #- coveralls
\ No newline at end of file
+ #- coveralls
index cfab53f256edede599816bbd07cd718201e3f26b..c20503648674a3aa37a3bdf956d38979f0e4d84a 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/bash
+set -e
+
 
 export TEMPDIR=$(mktemp -d)
 export WAVFILE=$(python -c"from timeside.core.tools.test_samples import samples; print samples['C4_scale.wav']")
@@ -18,4 +20,4 @@ echo ' timeside-waveforms '
 echo '-----------------------------------------------------'
 
 timeside-waveforms $WAVDIR $TEMPDIR
-ls $TEMPDIR
\ No newline at end of file
+ls $TEMPDIR