Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Karsten Rink
ogs
Commits
cfa50867
Commit
cfa50867
authored
6 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Write disabled benchmarks info to file instead of CMake out.
See disabled-tests.log
parent
e272cc36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+3
-0
3 additions, 0 deletions
CMakeLists.txt
scripts/cmake/test/AddTest.cmake
+4
-4
4 additions, 4 deletions
scripts/cmake/test/AddTest.cmake
with
7 additions
and
4 deletions
CMakeLists.txt
+
3
−
0
View file @
cfa50867
...
@@ -347,6 +347,9 @@ if( BUILD_TESTING AND NOT IS_SUBPROJECT )
...
@@ -347,6 +347,9 @@ if( BUILD_TESTING AND NOT IS_SUBPROJECT )
endif
()
endif
()
endif
()
endif
()
file
(
WRITE
${
PROJECT_BINARY_DIR
}
/disabled-tests.log
"
${
DISABLED_TESTS_LOG
}
"
)
unset
(
DISABLED_TESTS_LOG CACHE
)
# Don't write to CMakeCache.txt
# The configuration must be called from the source dir and not BaseLib/.
# The configuration must be called from the source dir and not BaseLib/.
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/BaseLib/BuildInfo.cpp.in"
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/BaseLib/BuildInfo.cpp.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/BaseLib/BuildInfo.cpp"
@ONLY
)
"
${
CMAKE_CURRENT_BINARY_DIR
}
/BaseLib/BuildInfo.cpp"
@ONLY
)
...
...
This diff is collapsed.
Click to expand it.
scripts/cmake/test/AddTest.cmake
+
4
−
4
View file @
cfa50867
...
@@ -75,7 +75,7 @@ function (AddTest)
...
@@ -75,7 +75,7 @@ function (AddTest)
if
(
${
AddTest_REQUIREMENTS
}
)
if
(
${
AddTest_REQUIREMENTS
}
)
# message(STATUS "Enabling test ${AddTest_NAME}.")
# message(STATUS "Enabling test ${AddTest_NAME}.")
else
()
else
()
message
(
STATUS
"
Requirement
${
AddTest_REQUIREMENTS
}
not met! Disabling test
${
AddTest_NAME
}
."
)
set
(
DISABLED_TESTS_LOG
"
${
DISABLED_TESTS_LOG
}
\n
Requirement
${
AddTest_REQUIREMENTS
}
not met! Disabling test
${
AddTest_NAME
}
."
CACHE INTERNAL
""
)
return
()
return
()
endif
()
endif
()
...
@@ -83,7 +83,7 @@ function (AddTest)
...
@@ -83,7 +83,7 @@ function (AddTest)
if
(
TIME_TOOL_PATH
)
if
(
TIME_TOOL_PATH
)
set
(
WRAPPER_COMMAND time
)
set
(
WRAPPER_COMMAND time
)
else
()
else
()
message
(
STATUS
"WARNING:
Disabling time wrapper for
${
AddTest_NAME
}
as time exe was not found!"
)
set
(
DISABLED_TESTS_LOG
"
${
DISABLED_TESTS_LOG
}
\n
Disabling time wrapper for
${
AddTest_NAME
}
as time exe was not found!"
CACHE INTERNAL
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
endif
()
endif
()
elseif
(
AddTest_WRAPPER STREQUAL
"memcheck"
)
elseif
(
AddTest_WRAPPER STREQUAL
"memcheck"
)
...
@@ -91,7 +91,7 @@ function (AddTest)
...
@@ -91,7 +91,7 @@ function (AddTest)
set
(
WRAPPER_COMMAND
"
${
VALGRIND_TOOL_PATH
}
--tool=memcheck --log-file=
${
AddTest_SOURCE_PATH
}
/
${
AddTest_NAME
}
_memcheck.log -v --leak-check=full --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xff"
)
set
(
WRAPPER_COMMAND
"
${
VALGRIND_TOOL_PATH
}
--tool=memcheck --log-file=
${
AddTest_SOURCE_PATH
}
/
${
AddTest_NAME
}
_memcheck.log -v --leak-check=full --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xff"
)
set
(
tester memcheck
)
set
(
tester memcheck
)
else
()
else
()
message
(
STATUS
"WARNING:
Disabling memcheck wrapper for
${
AddTest_NAME
}
as memcheck exe was not found!"
)
set
(
DISABLED_TESTS_LOG
"
${
DISABLED_TESTS_LOG
}
\n
Disabling memcheck wrapper for
${
AddTest_NAME
}
as memcheck exe was not found!"
CACHE INTERNAL
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
endif
()
endif
()
elseif
(
AddTest_WRAPPER STREQUAL
"callgrind"
)
elseif
(
AddTest_WRAPPER STREQUAL
"callgrind"
)
...
@@ -99,7 +99,7 @@ function (AddTest)
...
@@ -99,7 +99,7 @@ function (AddTest)
set
(
WRAPPER_COMMAND
"
${
VALGRIND_TOOL_PATH
}
--tool=callgrind --branch-sim=yes --cache-sim=yes --dump-instr=yes --collect-jumps=yes"
)
set
(
WRAPPER_COMMAND
"
${
VALGRIND_TOOL_PATH
}
--tool=callgrind --branch-sim=yes --cache-sim=yes --dump-instr=yes --collect-jumps=yes"
)
unset
(
tester
)
unset
(
tester
)
else
()
else
()
message
(
STATUS
"WARNING:
Disabling callgrind wrapper for
${
AddTest_NAME
}
as callgrind exe was not found!"
)
set
(
DISABLED_TESTS_LOG
"
${
DISABLED_TESTS_LOG
}
\n
Disabling callgrind wrapper for
${
AddTest_NAME
}
as callgrind exe was not found!"
CACHE INTERNAL
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
set
(
AddTest_WRAPPER_ARGS
""
)
endif
()
endif
()
elseif
(
AddTest_WRAPPER STREQUAL
"mpirun"
)
elseif
(
AddTest_WRAPPER STREQUAL
"mpirun"
)
...
...
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