diff --git a/.travis.yml b/.travis.yml index 3aed011..80e6603 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: cpp install: - sudo apt-get install g++ cmake gfortran - sudo pip install pytest pep8 -before_script: - - export PYTHONPATH=$PYTHONPATH:$(pwd) script: - pep8 --ignore=E501 update.py - pep8 --ignore=E501 test/test.py diff --git a/test/cxx/cmake/autocmake.cfg b/test/cxx/cmake/autocmake.cfg index 0d0494b..cbe5364 100644 --- a/test/cxx/cmake/autocmake.cfg +++ b/test/cxx/cmake/autocmake.cfg @@ -2,14 +2,14 @@ name: example [cxx] -source: https://github.com/scisoft/autocmake/raw/master/modules/cxx.cmake +source: ../../../modules/cxx.cmake docopt: --cxx= C++ compiler [default: g++]. --extra-cxx-flags= Extra C++ compiler flags [default: '']. export: 'CXX=%s' % arguments['--cxx'] define: '-DEXTRA_CXXFLAGS="%s"' % arguments['--extra-cxx-flags'] [default_build_paths] -source: https://github.com/scisoft/autocmake/raw/master/modules/default_build_paths.cmake +source: ../../../modules/default_build_paths.cmake [src] -source: https://github.com/scisoft/autocmake/raw/master/modules/src.cmake +source: ../../../modules/src.cmake diff --git a/test/fc/cmake/autocmake.cfg b/test/fc/cmake/autocmake.cfg index 041edf0..a8df0c3 100644 --- a/test/fc/cmake/autocmake.cfg +++ b/test/fc/cmake/autocmake.cfg @@ -2,17 +2,14 @@ name: example [fc] -source: https://github.com/scisoft/autocmake/raw/master/modules/fc.cmake +source: ../../../modules/fc.cmake docopt: --fc= Fortran compiler [default: gfortran]. --extra-fc-flags= Extra Fortran compiler flags [default: '']. export: 'FC=%s' % arguments['--fc'] define: '-DEXTRA_FCFLAGS="%s"' % arguments['--extra-fc-flags'] -[compilers] -source: https://github.com/scisoft/autocmake/raw/master/compilers/GNU.Fortran.cmake - [default_build_paths] -source: https://github.com/scisoft/autocmake/raw/master/modules/default_build_paths.cmake +source: ../../../modules/default_build_paths.cmake [src] -source: https://github.com/scisoft/autocmake/raw/master/modules/src.cmake +source: ../../../modules/src.cmake diff --git a/test/test.py b/test/test.py index 40f3b8b..ebd71d0 100644 --- a/test/test.py +++ b/test/test.py @@ -1,9 +1,11 @@ import os import subprocess -import update +import shutil HERE = os.path.abspath(os.path.dirname(__file__)) +# ------------------------------------------------------------------------------ + def exe(command): stdout, stderr = subprocess.Popen(command.split(), @@ -11,10 +13,12 @@ def exe(command): stderr=subprocess.PIPE).communicate() return stdout, stderr +# ------------------------------------------------------------------------------ + def test_cxx(): os.chdir(os.path.join(HERE, 'cxx', 'cmake')) - update.fetch_url('https://github.com/scisoft/autocmake/raw/master/update.py', 'update.py') + shutil.copy(os.path.join('..', '..', '..', 'update.py'), 'update.py') stdout, stderr = exe('python update.py --self') stdout, stderr = exe('python update.py ..') os.chdir(os.path.join(HERE, 'cxx')) @@ -24,10 +28,12 @@ def test_cxx(): stdout, stderr = exe('./bin/example') assert 'Hello World!' in stdout +# ------------------------------------------------------------------------------ + def test_fc(): os.chdir(os.path.join(HERE, 'fc', 'cmake')) - update.fetch_url('https://github.com/scisoft/autocmake/raw/master/update.py', 'update.py') + shutil.copy(os.path.join('..', '..', '..', 'update.py'), 'update.py') stdout, stderr = exe('python update.py --self') stdout, stderr = exe('python update.py ..') os.chdir(os.path.join(HERE, 'fc'))