Skip to content

Commit

Permalink
Merge pull request #2819 from nicolossus/add_sli2py_ignore_dir
Browse files Browse the repository at this point in the history
Add `sli2py_ignore` subdirectories
  • Loading branch information
jougs authored Jun 28, 2023
2 parents 379d507 + b135a27 commit 4694760
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
12 changes: 7 additions & 5 deletions testsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ set( TESTSUBDIRS
musictests
cpptests
pytests
)
)

add_subdirectory( selftests )
add_subdirectory( unittests )
add_subdirectory( unittests/sli2py_ignore )
add_subdirectory( regressiontests )
add_subdirectory( regressiontests/sli2py_ignore )
add_subdirectory( mpi_selftests/fail )
add_subdirectory( mpi_selftests/pass )
add_subdirectory( mpitests )
Expand All @@ -39,19 +41,19 @@ add_subdirectory( cpptests )

install( DIRECTORY ${TESTSUBDIRS}
DESTINATION ${CMAKE_INSTALL_DATADIR}/testsuite
)
)

install( PROGRAMS
do_tests.sh
DESTINATION ${CMAKE_INSTALL_DATADIR}/testsuite
)
)

install( PROGRAMS
nest_indirect
nest_serial
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
)

install( FILES junit_xml.sh run_test.sh summarize_tests.py
DESTINATION ${CMAKE_INSTALL_DATADIR}/testsuite
)
)
12 changes: 9 additions & 3 deletions testsuite/do_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,12 @@ if test "${PYTHON}"; then
tests_collect="$tests_collect py"
fi
for test_ext in ${tests_collect} ; do
for test_name in $(ls "${TEST_BASEDIR}/unittests/" | grep ".*\.${test_ext}\$") ; do
run_test "unittests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
done
for test_name in $(ls "${TEST_BASEDIR}/unittests/" | grep ".*\.${test_ext}\$") ; do
run_test "unittests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
done
for test_name in $(ls "${TEST_BASEDIR}/unittests/sli2py_ignore/" | grep ".*\.${test_ext}\$") ; do
run_test "unittests/sli2py_ignore/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
done
done

junit_close
Expand All @@ -350,6 +353,9 @@ for test_ext in ${tests_collect} ; do
for test_name in $(ls "${TEST_BASEDIR}/regressiontests/" | grep ".*\.${test_ext}$") ; do
run_test "regressiontests/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
done
for test_name in $(ls "${TEST_BASEDIR}/regressiontests/sli2py_ignore/" | grep ".*\.${test_ext}$") ; do
run_test "regressiontests/sli2py_ignore/${test_name}" "${CODES_SUCCESS}" "${CODES_SKIPPED}" "${CODES_FAILURE}"
done
done

junit_close
Expand Down
28 changes: 28 additions & 0 deletions testsuite/regressiontests/sli2py_ignore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# testsuite/regressiontests/sli2py_ignore/CMakeLists.txt
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# NEST is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NEST. If not, see <http://www.gnu.org/licenses/>.

# add regressiontests files
file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )

foreach( script ${scripts} )
add_test( NAME regressiontests/sli2py_ignore/${script}
COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
${CMAKE_INSTALL_FULL_DOCDIR}/regressiontests/sli2py_ignore/${script} # use the installed version
)
endforeach()
28 changes: 28 additions & 0 deletions testsuite/unittests/sli2py_ignore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# testsuite/unittests/sli2py_ignore/CMakeLists.txt
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# NEST is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NEST. If not, see <http://www.gnu.org/licenses/>.

# add unittests/sli2py_ignore files
file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )

foreach( script ${scripts} )
add_test( NAME unittests/sli2py_ignore/${script}
COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
${CMAKE_INSTALL_FULL_DOCDIR}/unittests/sli2py_ignore/${script} # use the installed version
)
endforeach()

0 comments on commit 4694760

Please sign in to comment.