Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Timo Koch
dune-common
Commits
68e9e66b
Commit
68e9e66b
authored
9 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Add the possibility of command line arguments to dune_add_test
parent
e488a7c1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/DuneTestMacros.cmake
+7
-2
7 additions, 2 deletions
cmake/modules/DuneTestMacros.cmake
with
7 additions
and
2 deletions
cmake/modules/DuneTestMacros.cmake
+
7
−
2
View file @
68e9e66b
...
...
@@ -74,6 +74,11 @@
#
# The test will be marked as skipped in ctest if it returned 77.
#
# .. cmake_param:: CMD_ARGS
# :multi:
#
# Command line arguments that should be passed to this test.
#
# This function defines the Dune way of adding a test to the testing suite.
# You may either add the executable yourself through :ref:`add_executable`
# and pass it to the :code:`TARGET` option, or you may rely on :ref:`dune_add_test`
...
...
@@ -97,7 +102,7 @@ function(dune_add_test)
include
(
CMakeParseArguments
)
set
(
OPTIONS EXPECT_COMPILE_FAIL EXPECT_FAIL SKIP_ON_77
)
set
(
SINGLEARGS NAME TARGET
)
set
(
MULTIARGS SOURCES COMPILE_DEFINITIONS COMPILE_FLAGS LINK_LIBRARIES
)
set
(
MULTIARGS SOURCES COMPILE_DEFINITIONS COMPILE_FLAGS LINK_LIBRARIES
CMD_ARGS
)
cmake_parse_arguments
(
ADDTEST
"
${
OPTIONS
}
"
"
${
SINGLEARGS
}
"
"
${
MULTIARGS
}
"
${
ARGN
}
)
# Check whether the parser produced any errors
...
...
@@ -159,7 +164,7 @@ function(dune_add_test)
# Now add the actual test
_add_test
(
NAME
${
ADDTEST_NAME
}
COMMAND
${
TESTCOMMAND
}
COMMAND
${
TESTCOMMAND
}
${
ADDTEST_CMD_ARGS
}
)
# Process the EXPECT_FAIL option
...
...
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