Skip to content

Commit

Permalink
Merge pull request #82 from bast/radovan/runtest
Browse files Browse the repository at this point in the history
Use runtest library for testing; fixes #28, fixes #80
  • Loading branch information
heikef authored Dec 1, 2017
2 parents e14716c + 9ced2fe commit 53eb136
Show file tree
Hide file tree
Showing 61 changed files with 226 additions and 11,040 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: python
python:
- 2.7

sudo: false

matrix:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pyparsing
pyyaml
sphinx
sphinx_rtd_theme
git+https://github.com/bast/runtest.git@master
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# hack for Travis because we have a strange dependency on numpy header files
# remove this once we get rid of Cython
if(DEFINED ENV{TRAVIS_TEST})
include_directories(/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/numpy/core/include/)
endif()

include_directories(${CMAKE_BINARY_DIR})
include(ExternalProject)
add_subdirectory(libgimic)
Expand Down
2 changes: 1 addition & 1 deletion src/fgimic/gimic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ subroutine program_header
call msg_out('*** Written by Jonas Juselius ***')
call msg_out('*** ***')
call msg_out('*** This software is copyright (c) 2003-2011 by ***')
call msg_out('*** Jonas Juselius, University of Tromsø. ***')
call msg_out('*** Jonas Juselius, University of Tromso. ***')
call msg_out('*** ***')
call msg_out('*** You are free to distribute this software under the ***')
call msg_out('*** terms of the GNU General Public License ***')
Expand Down
16 changes: 16 additions & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*/*/*.diff
*/*/*.filtered
*/*/*.reference
*/*/stderr
*/*/stdout
*/*/grid.xyz
*/*/mol.xyz
*/*/acid.txt
*/*/jmod.txt
*/*/jvec.txt
*/*/jvec.vti
*/*/acid.cube
*/*/acid.vti
*/*/jmod.cube
*/*/jmod.vti
*/*/jmod_quasi.cube
10 changes: 0 additions & 10 deletions test/C4H4/C4H4-opt-orientedZ.xyz

This file was deleted.

11 changes: 0 additions & 11 deletions test/C4H4/coord

This file was deleted.

15 changes: 0 additions & 15 deletions test/C4H4/int/grid.xyz

This file was deleted.

10 changes: 0 additions & 10 deletions test/C4H4/int/mol.xyz

This file was deleted.

36 changes: 21 additions & 15 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set (PYTHON_INSTDIR ${PROJECT_SOURCE_DIR}/src/gimic)
configure_file(${CMAKE_SOURCE_DIR}/src/gimic.in
${CMAKE_CURRENT_BINARY_DIR}/gimic @ONLY
)
execute_process(COMMAND
chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/gimic OUTPUT_QUIET)
execute_process(COMMAND
chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/gimic OUTPUT_QUIET)

# Configure input
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vectors.inp.in
Expand All @@ -24,17 +24,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.py.in
${CMAKE_CURRENT_BINARY_DIR}/test.py @ONLY
)
execute_process(
COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py
COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py
OUTPUT_QUIET
)
)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyGimicTest.py.in
${CMAKE_CURRENT_BINARY_DIR}/PyGimicTest.py @ONLY
)
execute_process(
COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py
COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py
OUTPUT_QUIET
)
)

# Add tests
add_test(NAME Vectors
Expand All @@ -45,12 +45,18 @@ add_test(NAME BondIntegral
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test.py bondint
)

add_test(
NAME shell-test
COMMAND ${PROJECT_SOURCE_DIR}/test/gimic-test.sh ${PROJECT_BINARY_DIR}/bin -v
)

add_test(
NAME 2D-3D
COMMAND ${PROJECT_SOURCE_DIR}/test/gimic-test-2D-3D.sh ${PROJECT_BINARY_DIR}/bin -v
)
foreach(_name
benzene/integration
benzene/2d
benzene/3d
c4h4/integration
)
add_test(
NAME ${_name}
COMMAND ./test
--binary-dir=${PROJECT_BINARY_DIR}/bin
--work-dir=${PROJECT_BINARY_DIR}/test/${_name}
--verbose
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test/${_name}
)
endforeach()
19 changes: 0 additions & 19 deletions test/benzene/2D/grid.xyz

This file was deleted.

Binary file removed test/benzene/2D/jvec-2d-paraview.jpg
Binary file not shown.
Loading

0 comments on commit 53eb136

Please sign in to comment.