Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
particle_methods
hysop
Commits
e831d8ec
There was a problem fetching the pipeline summary.
Commit
e831d8ec
authored
6 years ago
by
Jean-Baptiste Keck
Browse files
Options
Downloads
Patches
Plain Diff
Fixed CTests and make test
parent
bf541345
No related branches found
No related tags found
1 merge request
!2
Resolve "Tests"
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+4
-4
4 additions, 4 deletions
CMakeLists.txt
cmake/hysop_tests.cmake
+11
-14
11 additions, 14 deletions
cmake/hysop_tests.cmake
with
15 additions
and
18 deletions
CMakeLists.txt
+
4
−
4
View file @
e831d8ec
...
...
@@ -30,8 +30,8 @@ include(MyTools)
# User defined options
option
(
VERBOSE_MODE
"Print cmake-hysop state summary. Default = on"
ON
)
option
(
DOUBLEPREC
"
switch between single and double precision for real numbers. Default = on, ie double precision
."
ON
)
option
(
USE_MPI
"
c
ompile and link HySoP with mpi when this mode is enable. Default = on. WARNING: off mode is bugged."
ON
)
option
(
DOUBLEPREC
"
Set default HySoP floating point precision. Default = on, ie double precision else single precision will be used
."
ON
)
option
(
USE_MPI
"
C
ompile and link HySoP with mpi when this mode is enable. Default = on. WARNING: off mode is bugged."
ON
)
option
(
WITH_TESTS
"Enable testing. Default = OFF"
ON
)
option
(
BUILD_SHARED_LIBS
"Enable dynamic library build, default = ON."
ON
)
option
(
USE_CXX
"Expand hysop with some new functions from a generated c++ to python interface, wrapped into hysop.cpp2hysop module. Default = ON."
ON
)
...
...
@@ -581,9 +581,9 @@ add_custom_target(pyclean COMMAND rm -f ${PYCFILES}
# ============= Tests =============
if
(
WITH_TESTS
)
if
(
NOT ENABLE_LONG_TESTS
)
set
(
TEST_TIMEOUT
15
CACHE STRING
"Default value for test runtime limit (in seconds)"
)
set
(
TEST_TIMEOUT
360
CACHE STRING
"Default value for test runtime limit (in seconds)"
)
else
()
set
(
TEST_TIMEOUT
5
00 CACHE STRING
"Default value for test runtime limit (in seconds)"
)
set
(
TEST_TIMEOUT
36
00 CACHE STRING
"Default value for test runtime limit (in seconds)"
)
endif
()
include
(
CTest
)
# Number of mpi processes used to run tests.
...
...
This diff is collapsed.
Click to expand it.
cmake/hysop_tests.cmake
+
11
−
14
View file @
e831d8ec
...
...
@@ -13,11 +13,17 @@ enable_testing()
find_python_module
(
pytest REQUIRED
)
# === Tests options ===
set
(
pytest_opt
"-v"
CACHE INTERNAL
"extra options for py.test"
)
# Force create data directory for tests event if no tests needs it
# because this will we the working directory for all tests.
file
(
MAKE_DIRECTORY
${
CMAKE_BINARY_DIR
}
/dataForTests
)
# Declaration of python test
# Usage:
# add_python_test(name file)
# with 'name' is the name of the test and file the source
# file for the test.
# Add_python_test(name file) with 'name' is the name of the test
# and file the source file for the test.
macro
(
add_python_test test_name test_file
)
add_test
(
${
test_name
}
py.test
"
${
pytest_opt
}
"
${
test_file
}
)
set_tests_properties
(
${
test_name
}
PROPERTIES FAIL_REGULAR_EXPRESSION
"FAILURE;Exception;[^x]failed;ERROR;Assertion"
)
...
...
@@ -45,16 +51,8 @@ endmacro()
# --> set test dir
set
(
testDir
${
HYSOP_BUILD_PYTHONPATH
}
)
# === Tests options ===
if
(
FULL_TEST
)
set
(
pytest_opt
"-s -v -pep8"
CACHE INTERNAL
"extra options for py.test"
)
else
()
set
(
pytest_opt
"-v"
CACHE INTERNAL
"extra options for py.test"
)
endif
()
# === Set the list of all directories which may contain tests ===
set
(
py_src_dirs operator
)
set
(
py_src_dirs
core/arrays fields
operator
)
# === Create the files list from all directories in py_src_dirs ===
...
...
@@ -63,7 +61,7 @@ set(py_test_files)
foreach
(
testdir
${
py_src_dirs
}
)
file
(
GLOB testfiles RELATIVE
${
CMAKE_SOURCE_DIR
}
hysop/
${
testdir
}
/tests/test_*.py
)
set
(
py_test_files
${
py_test_files
}
${
testfiles
}
)
# copy data files
# copy data files
required by the tests
file
(
GLOB reffiles hysop/
${
testdir
}
/tests/ref_files/*
)
file
(
COPY
${
reffiles
}
DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
/dataForTests
)
endforeach
()
...
...
@@ -83,7 +81,6 @@ foreach(testdir ${py_src_dirs})
endforeach
()
endforeach
()
# === Create tests from py_test_files ===
foreach
(
testfile
${
py_test_files
}
)
set
(
execname
${
CMAKE_SOURCE_DIR
}
/
${
testfile
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment