From 1bf3d3e35512662487c1859043bde6db38087c80 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Fri, 7 Aug 2015 16:47:50 +0200 Subject: [PATCH] more consistency --- test/cxx/src/example.cpp | 2 +- test/cxx_custom/src/example.cpp | 2 +- test/extra_cmake_options/src/example.cpp | 2 +- test/fc/src/module.f90 | 2 +- test/fc_blas/src/example.f90 | 4 ++-- test/fc_git_info/src/example.F90 | 2 +- test/fc_int64/src/example.f90 | 4 ++-- test/fc_lapack/src/example.F90 | 2 +- test/fc_mpi/src/example.f90 | 4 ++-- test/test.py | 24 +++++++++++++++--------- 10 files changed, 27 insertions(+), 21 deletions(-) diff --git a/test/cxx/src/example.cpp b/test/cxx/src/example.cpp index 4dd9d62..fc43d52 100644 --- a/test/cxx/src/example.cpp +++ b/test/cxx/src/example.cpp @@ -2,6 +2,6 @@ int main() { - std::cout << "Hello World!"; + std::cout << "PASSED"; return 0; } diff --git a/test/cxx_custom/src/example.cpp b/test/cxx_custom/src/example.cpp index 4dd9d62..fc43d52 100644 --- a/test/cxx_custom/src/example.cpp +++ b/test/cxx_custom/src/example.cpp @@ -2,6 +2,6 @@ int main() { - std::cout << "Hello World!"; + std::cout << "PASSED"; return 0; } diff --git a/test/extra_cmake_options/src/example.cpp b/test/extra_cmake_options/src/example.cpp index 4dd9d62..fc43d52 100644 --- a/test/extra_cmake_options/src/example.cpp +++ b/test/extra_cmake_options/src/example.cpp @@ -2,6 +2,6 @@ int main() { - std::cout << "Hello World!"; + std::cout << "PASSED"; return 0; } diff --git a/test/fc/src/module.f90 b/test/fc/src/module.f90 index 3e108ac..6cd0e3a 100644 --- a/test/fc/src/module.f90 +++ b/test/fc/src/module.f90 @@ -2,6 +2,6 @@ module foo implicit none contains subroutine hello() - print *, 'Hello World!' + print *, 'PASSED' end subroutine end module diff --git a/test/fc_blas/src/example.f90 b/test/fc_blas/src/example.f90 index 06221d5..7be86c7 100644 --- a/test/fc_blas/src/example.f90 +++ b/test/fc_blas/src/example.f90 @@ -37,9 +37,9 @@ program example deallocate(c) if (test_ok) then - print *, 'dgemm test ok' + print *, 'PASSED' else - print *, 'dgemm test failed' + print *, 'FAILED' end if end program diff --git a/test/fc_git_info/src/example.F90 b/test/fc_git_info/src/example.F90 index c05d5d1..6b8d888 100644 --- a/test/fc_git_info/src/example.F90 +++ b/test/fc_git_info/src/example.F90 @@ -11,6 +11,6 @@ program example len(GIT_COMMIT_DATE) > 0 .and. & len(GIT_BRANCH) > 0 - if (test_ok) print *, 'Test OK!' + if (test_ok) print *, 'PASSED' end program diff --git a/test/fc_int64/src/example.f90 b/test/fc_int64/src/example.f90 index caf4a48..45cc4f2 100644 --- a/test/fc_int64/src/example.f90 +++ b/test/fc_int64/src/example.f90 @@ -7,8 +7,8 @@ program example i=i8ref test_ok = (sizeof(i) == 8 .and. i == 2147483648) if (test_ok) then - print *,"test_int64 ok" + print *, "PASSED" else - stop "test_int64 failed!" + stop "FAILED" endif end program diff --git a/test/fc_lapack/src/example.F90 b/test/fc_lapack/src/example.F90 index 09f2b26..367327e 100644 --- a/test/fc_lapack/src/example.F90 +++ b/test/fc_lapack/src/example.F90 @@ -32,7 +32,7 @@ program example dabs(b(3) - 0.25d0) <= small if (roots_ok) then - print *, 'dgesv test ok' + print *, 'PASSED' else stop 'ERROR: dgesv test failed!' endif diff --git a/test/fc_mpi/src/example.f90 b/test/fc_mpi/src/example.f90 index 0c855ee..b73e21d 100644 --- a/test/fc_mpi/src/example.f90 +++ b/test/fc_mpi/src/example.f90 @@ -9,8 +9,8 @@ program example call MPI_FINALIZE(ierr) test_ok=(size==2.and.(rank==0.or.rank==1)) if (test_ok) then - if (rank == 0) print *,'Test OK!' + if (rank == 0) print *, 'PASSED' else - stop "test fc_mpi failed!" + stop "FAILED" endif end program diff --git a/test/test.py b/test/test.py index 7e480f5..b4e1d8d 100644 --- a/test/test.py +++ b/test/test.py @@ -115,44 +115,50 @@ def configure_build_and_exe(name, setup_command, launcher=None): def test_cxx_custom(): stdout, stderr = configure_build_and_exe('cxx_custom', 'python setup.py --cxx=g++') - assert 'Hello World!' in stdout + assert 'PASSED' in stdout # ------------------------------------------------------------------------------ def test_extra_cmake_options(): stdout, stderr = configure_build_and_exe('extra_cmake_options', 'python setup.py --cxx=g++ --cmake-options="-DENABLE_SOMETHING=OFF -DENABLE_FOO=ON"') - assert 'Hello World!' in stdout + assert 'PASSED' in stdout # ------------------------------------------------------------------------------ def test_cxx(): stdout, stderr = configure_build_and_exe('cxx', 'python setup.py --cxx=g++') - assert 'Hello World!' in stdout + assert 'PASSED' in stdout # ------------------------------------------------------------------------------ def test_fc(): stdout, stderr = configure_build_and_exe('fc', 'python setup.py --fc=gfortran') - assert 'Hello World!' in stdout + assert 'PASSED' in stdout + +# ------------------------------------------------------------------------------ def test_fc_git_info(): stdout, stderr = configure_build_and_exe('fc_git_info', 'python setup.py --fc=gfortran') - assert 'Test OK!' in stdout + assert 'PASSED' in stdout + +# ------------------------------------------------------------------------------ def test_fc_int64(): stdout, stderr = configure_build_and_exe('fc_int64', 'python setup.py --fc=gfortran --int64') - assert 'test_int64 ok' in stdout + assert 'PASSED' in stdout + +# ------------------------------------------------------------------------------ def test_fc_mpi(): if sys.platform != 'win32': stdout, stderr = configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90', 'mpirun -np 2') - assert 'Test OK!' in stdout + assert 'PASSED' in stdout else: pass @@ -162,7 +168,7 @@ def test_fc_mpi(): def test_fc_blas(): if sys.platform != 'win32': stdout, stderr = configure_build_and_exe('fc_blas', 'python setup.py --fc=gfortran') - assert 'dgemm test ok' in stdout + assert 'PASSED' in stdout else: pass @@ -172,6 +178,6 @@ def test_fc_blas(): def test_fc_lapack(): if sys.platform != 'win32': stdout, stderr = configure_build_and_exe('fc_lapack', 'python setup.py --fc=gfortran') - assert 'dgesv test ok' in stdout + assert 'PASSED' in stdout else: pass