Skip to content

Commit

Permalink
Merge pull request VUnit#206 from joshrsmith/master
Browse files Browse the repository at this point in the history
Use tox as backend for Travis testing
  • Loading branch information
kraigher authored Nov 12, 2016
2 parents 9c84144 + 277341c commit db0186e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 59 deletions.
24 changes: 11 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
language: python
matrix:
include:
- env: BUILD_NAME=UNIT
- env: BUILD_NAME=py27-unit
python: '2.7'
- env: BUILD_NAME=UNIT
- env: BUILD_NAME=py33-unit
python: '3.3'
- env: BUILD_NAME=UNIT
- env: BUILD_NAME=py34-unit
python: '3.4'
- env: BUILD_NAME=UNIT
- env: BUILD_NAME=py35-unit
python: '3.5'

- env: BUILD_NAME=LINT
- env: BUILD_NAME=py27-lint
python: '2.7'
- env: BUILD_NAME=LINT
- env: BUILD_NAME=py35-lint
python: '3.5'

- env: BUILD_NAME=DOCS
- env: BUILD_NAME=py27-docs
python: '2.7'
- env: BUILD_NAME=DOCS
- env: BUILD_NAME=py35-docs
python: '3.5'

# Python 2.7 with ghdl mcode
- env: BUILD_NAME=ACCEPTANCE
- env: BUILD_NAME=py27-acceptance-ghdl
python: '2.7'
os: linux
sudo: false
Expand All @@ -39,10 +39,9 @@ matrix:
- make install
- cd ../../
- export PATH=$PATH:install-ghdl-mcode/bin/
- export VUNIT_SIMULATOR=ghdl

# Python 3.5 with ghdl llvm
- env: BUILD_NAME=ACCEPTANCE
- env: BUILD_NAME=py35-acceptance-ghdl
python: '3.5'
os: linux
sudo: required
Expand All @@ -61,10 +60,9 @@ matrix:
- make install
- cd ../../
- export PATH=$PATH:install-ghdl-llvm/bin/
- export VUNIT_SIMULATOR=ghdl

install:
- pip install tox

script:
- python travis.py ${BUILD_NAME}
- tox -e $BUILD_NAME
13 changes: 8 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,33,34,35}-unit, py{27,33,34,35}-acceptance-{activehdl,ghdl,modelsim,rivierapro}, lint, docs
envlist = py{27,33,34,35}-unit, py{27,33,34,35}-acceptance-{activehdl,ghdl,modelsim,rivierapro}, py{27,35}-lint, py{27,35}-docs, py{27,35}-license
skip_missing_interpreters = True

[testenv]
Expand All @@ -20,7 +20,10 @@ setenv=
acceptance-rivierapro: VUNIT_SIMULATOR=rivierapro

commands=
unit: {envpython} -m unittest discover -s {envdir} vunit/test/unit
acceptance: {envpython} -m unittest discover -s {envdir} vunit/test/acceptance
lint: {envpython} -m unittest discover -s {envdir} vunit/test/lint
docs: {envbindir}/sphinx-build -T -W -E -a -n -b html docs {envtmpdir}/docsbuild
unit: {envpython} -m unittest discover vunit/test/unit
acceptance: {envpython} -m unittest discover vunit/test/acceptance
lint: {envpython} -m unittest discover vunit/test/lint -p *pep8.py
lint: {envpython} -m unittest discover vunit/test/lint -p *pylint.py
lint: {envpython} -m unittest discover vunit/test/lint -p *readme.py
license: {envpython} -m unittest discover vunit/test/lint -p *license.py
docs: {envbindir}/sphinx-build -T -E -a -n -b html docs {envtmpdir}/docsbuild
39 changes: 0 additions & 39 deletions travis.py

This file was deleted.

2 changes: 1 addition & 1 deletion vunit/test/lint/test_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_that_a_valid_license_exists_in_source_files_and_that_global_licensing_i
self._check_no_trailing_whitespace(code, file_name)

def test_that_license_file_matches_vunit_license_text(self):
with open(join(ROOT, 'LICENSE.txt')) as lic:
with open(join(ROOT, 'LICENSE.txt'), "rU") as lic:
self.assertEqual(lic.read(), license_text())

def _check_license(self, code, file_name):
Expand Down
2 changes: 1 addition & 1 deletion vunit/test/lint/test_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ class TestReadMe(unittest.TestCase):
"""

def test_that_readme_file_matches_vunit_docstring(self):
with open(join(ROOT, 'README.rst')) as readme:
with open(join(ROOT, 'README.rst'), "rU") as readme:
self.assertEqual(readme.read(), doc())

0 comments on commit db0186e

Please sign in to comment.