From 939de1edb0fda431a9d22ddcd55d513ca04d258f Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Fri, 20 May 2016 15:35:13 +0200 Subject: [PATCH] reactivate one real test --- .gitignore | 2 +- .travis.yml | 2 +- .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 test/fc/cmake/autocmake.cfg | 12 --------- test/fc/cmake/autocmake.yml | 9 +++++++ .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 .../cmake/{autocmake.cfg => autocmake.yml} | 0 test/test.py | 25 ++++++++++++------- 20 files changed, 27 insertions(+), 23 deletions(-) rename test/boost_header_only/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/boost_libs/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/cxx/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/cxx_accelerate/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/cxx_cblas/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/extra_cmake_options/cmake/{autocmake.cfg => autocmake.yml} (100%) delete mode 100644 test/fc/cmake/autocmake.cfg create mode 100644 test/fc/cmake/autocmake.yml rename test/fc_blas/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/fc_git_info/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/fc_int64/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/fc_lapack/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/fc_omp/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/python_interpreter/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/python_interpreter_custom/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/python_libs/cmake/{autocmake.cfg => autocmake.yml} (100%) rename test/python_libs_custom/cmake/{autocmake.cfg => autocmake.yml} (100%) diff --git a/.gitignore b/.gitignore index 2eaf211..acb6d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ __pycache__/ test/*/CMakeLists.txt test/*/build*/ test/*/cmake/update.py -test/*/cmake/lib/ +test/*/cmake/autocmake/ test/*/cmake/downloaded/ test/*/setup diff --git a/.travis.yml b/.travis.yml index 3a94345..8e1a508 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,7 @@ script: - pep8 --ignore E501,E265 autocmake # # unit tests - py.test -vv autocmake/* -# - py.test -vv test/test.py + - py.test -vv test/test.py notifications: email: false diff --git a/test/boost_header_only/cmake/autocmake.cfg b/test/boost_header_only/cmake/autocmake.yml similarity index 100% rename from test/boost_header_only/cmake/autocmake.cfg rename to test/boost_header_only/cmake/autocmake.yml diff --git a/test/boost_libs/cmake/autocmake.cfg b/test/boost_libs/cmake/autocmake.yml similarity index 100% rename from test/boost_libs/cmake/autocmake.cfg rename to test/boost_libs/cmake/autocmake.yml diff --git a/test/cxx/cmake/autocmake.cfg b/test/cxx/cmake/autocmake.yml similarity index 100% rename from test/cxx/cmake/autocmake.cfg rename to test/cxx/cmake/autocmake.yml diff --git a/test/cxx_accelerate/cmake/autocmake.cfg b/test/cxx_accelerate/cmake/autocmake.yml similarity index 100% rename from test/cxx_accelerate/cmake/autocmake.cfg rename to test/cxx_accelerate/cmake/autocmake.yml diff --git a/test/cxx_cblas/cmake/autocmake.cfg b/test/cxx_cblas/cmake/autocmake.yml similarity index 100% rename from test/cxx_cblas/cmake/autocmake.cfg rename to test/cxx_cblas/cmake/autocmake.yml diff --git a/test/extra_cmake_options/cmake/autocmake.cfg b/test/extra_cmake_options/cmake/autocmake.yml similarity index 100% rename from test/extra_cmake_options/cmake/autocmake.cfg rename to test/extra_cmake_options/cmake/autocmake.yml diff --git a/test/fc/cmake/autocmake.cfg b/test/fc/cmake/autocmake.cfg deleted file mode 100644 index ca40fb4..0000000 --- a/test/fc/cmake/autocmake.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[project] -name: example -min_cmake_version: 2.8 - -[fc] -source: ../../../modules/fc.cmake - -[default_build_paths] -source: ../../../modules/default_build_paths.cmake - -[src] -source: ../../../modules/src.cmake diff --git a/test/fc/cmake/autocmake.yml b/test/fc/cmake/autocmake.yml new file mode 100644 index 0000000..7d2318c --- /dev/null +++ b/test/fc/cmake/autocmake.yml @@ -0,0 +1,9 @@ +name: example +min_cmake_version: 2.8 +modules: +- fc: + - source: ../../../modules/fc.cmake +- default_build_paths: + - source: ../../../modules/default_build_paths.cmake +- src: + - source: ../../../modules/src.cmake diff --git a/test/fc_blas/cmake/autocmake.cfg b/test/fc_blas/cmake/autocmake.yml similarity index 100% rename from test/fc_blas/cmake/autocmake.cfg rename to test/fc_blas/cmake/autocmake.yml diff --git a/test/fc_git_info/cmake/autocmake.cfg b/test/fc_git_info/cmake/autocmake.yml similarity index 100% rename from test/fc_git_info/cmake/autocmake.cfg rename to test/fc_git_info/cmake/autocmake.yml diff --git a/test/fc_int64/cmake/autocmake.cfg b/test/fc_int64/cmake/autocmake.yml similarity index 100% rename from test/fc_int64/cmake/autocmake.cfg rename to test/fc_int64/cmake/autocmake.yml diff --git a/test/fc_lapack/cmake/autocmake.cfg b/test/fc_lapack/cmake/autocmake.yml similarity index 100% rename from test/fc_lapack/cmake/autocmake.cfg rename to test/fc_lapack/cmake/autocmake.yml diff --git a/test/fc_omp/cmake/autocmake.cfg b/test/fc_omp/cmake/autocmake.yml similarity index 100% rename from test/fc_omp/cmake/autocmake.cfg rename to test/fc_omp/cmake/autocmake.yml diff --git a/test/python_interpreter/cmake/autocmake.cfg b/test/python_interpreter/cmake/autocmake.yml similarity index 100% rename from test/python_interpreter/cmake/autocmake.cfg rename to test/python_interpreter/cmake/autocmake.yml diff --git a/test/python_interpreter_custom/cmake/autocmake.cfg b/test/python_interpreter_custom/cmake/autocmake.yml similarity index 100% rename from test/python_interpreter_custom/cmake/autocmake.cfg rename to test/python_interpreter_custom/cmake/autocmake.yml diff --git a/test/python_libs/cmake/autocmake.cfg b/test/python_libs/cmake/autocmake.yml similarity index 100% rename from test/python_libs/cmake/autocmake.cfg rename to test/python_libs/cmake/autocmake.yml diff --git a/test/python_libs_custom/cmake/autocmake.cfg b/test/python_libs_custom/cmake/autocmake.yml similarity index 100% rename from test/python_libs_custom/cmake/autocmake.cfg rename to test/python_libs_custom/cmake/autocmake.yml diff --git a/test/test.py b/test/test.py index dd703f9..07f8ceb 100644 --- a/test/test.py +++ b/test/test.py @@ -51,15 +51,7 @@ def configure_build_and_exe(name, setup_command, launcher=None): os.chdir(os.path.join(HERE, name, 'cmake')) shutil.copy(os.path.join('..', '..', '..', 'update.py'), 'update.py') - dst_dir = 'lib' - if not os.path.exists(dst_dir): - os.makedirs(dst_dir) - shutil.copy(os.path.join('..', '..', '..', dst_dir, 'config.py'), dst_dir) - - dst_dir = os.path.join('lib', 'docopt') - if not os.path.exists(dst_dir): - os.makedirs(dst_dir) - shutil.copy(os.path.join('..', '..', '..', dst_dir, 'docopt.py'), dst_dir) + shutil.copytree(os.path.join('..', '..', '..', 'autocmake'), 'autocmake') stdout, stderr = exe('python update.py ..') os.chdir(os.path.join(HERE, name)) @@ -92,10 +84,12 @@ def configure_build_and_exe(name, setup_command, launcher=None): # ------------------------------------------------------------------------------ +@skip_always def test_extra_cmake_options(): configure_build_and_exe('extra_cmake_options', 'python setup --cxx=g++ --cmake-options="-DENABLE_SOMETHING=OFF -DENABLE_FOO=ON"') +@skip_always def test_cxx(): configure_build_and_exe('cxx', 'python setup --cxx=g++') @@ -104,60 +98,73 @@ def test_fc(): configure_build_and_exe('fc', 'python setup --fc=gfortran') +@skip_always def test_fc_git_info(): configure_build_and_exe('fc_git_info', 'python setup --fc=gfortran') +@skip_always def test_fc_int64(): configure_build_and_exe('fc_int64', 'python setup --fc=gfortran --int64') +@skip_always @skip_on_osx def test_fc_omp(): os.environ['OMP_NUM_THREADS'] = '2' configure_build_and_exe('fc_omp', 'python setup --omp --fc=gfortran') +@skip_always def test_fc_blas(): configure_build_and_exe('fc_blas', 'python setup --fc=gfortran --blas') +@skip_always def test_fc_lapack(): configure_build_and_exe('fc_lapack', 'python setup --fc=gfortran --lapack') +@skip_always @skip_on_osx def test_cxx_cblas(): configure_build_and_exe('cxx_cblas', 'python setup --cxx=g++ --cblas') +@skip_always @skip_on_linux def test_cxx_accelerate(): configure_build_and_exe('cxx_accelerate', 'python setup --cxx=g++ --accelerate') +@skip_always def test_python_interpreter(): configure_build_and_exe('python_interpreter', 'python setup --cxx=g++') +@skip_always def test_python_interpreter_custom(): setup = 'python setup --cxx=g++ --python=%s' % sys.executable configure_build_and_exe('python_interpreter_custom', setup) +@skip_always def test_python_libs(): configure_build_and_exe('python_libs', 'python setup --cxx=g++') +@skip_always def test_python_libs_custom(): python_executable = sys.executable configure_build_and_exe('python_libs_custom', 'python setup --cxx=g++ --python={0}'.format(python_executable)) +@skip_always def test_boost_header_only(): configure_build_and_exe('boost_header_only', 'python setup --cxx=g++') +@skip_always @skip_on_osx def test_boost_libs(): configure_build_and_exe('boost_libs', 'python setup --cxx=g++ --mpi')