You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manual.markdown
+32-5Lines changed: 32 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,14 +224,20 @@ The test execution of this will *likely* (no guarantee of order in CppUTest) be:
224
224
225
225
**-v* verbose, print each test name as it runs
226
226
**-c* colorize output, print green if OK, or red if failed
227
-
**-r#* repeat the tests some number (#) of times, or two times if # is not specified. This is handy if you are experiencing memory leaks. A second run that has no leaks indicates that someone is allocating statics and not releasing them.
228
-
**-g* group only run test whose group contains the substring group
229
-
**-sg* group only run test whose group exactly matches the string group
230
-
**-n* name only run test whose name contains the substring name
231
-
**-sn* name only run test whose name exactly matches the string name
227
+
**-r#* repeat the tests some number (#) of times, or twice if # is not specified. This is handy if you are experiencing memory leaks. A second run that has no leaks indicates that someone is allocating statics and not releasing them.
228
+
**-g group* only run test whose group contains the substring *group*
229
+
**-sg group* only run test whose group exactly matches the string *group*
230
+
**-xg group* exclude tests whose group contains the substring *group*
231
+
**-n name* only run test whose name contains the substring *name*
232
+
**-sn name* only run test whose name exactly matches the string *name*
233
+
**-xn name* exclude tests whose name contains the substring *name*
232
234
**"TEST(group, name)"* only run test whose group and name matches the strings group and name. This can be used to copy-paste output from the -v option on the command line.
233
235
**-ojunit* output to JUnit ant plugin style xml files (for CI systems)
236
+
**-oteamcity* output to xml files (as the name suggests, for TeamCity)
234
237
**-k* package name, Add a package name in JUnit output (for classification in CI systems)
238
+
**-lg* print a list of group names, separated by spaces
239
+
**-ln* print a list of test names in the form of *group.name*, separated by spaces
240
+
**-p* run tests in a separate process.
235
241
236
242
You can specify multiple -s|sg, -s|sn and "TEST(group, name)" parameters:
237
243
@@ -241,6 +247,27 @@ Specifying only test names with multiple -s|sn parameters will run all test
241
247
242
248
Mixing multiple -s|sg and -s|sn parameters (or using "TEST(group, name)" will only run tests whose groups match as well as their names.
243
249
250
+
Combining one -xg parameter with one -xn parameter will run only those tests that satisfy both criteria.
251
+
252
+
Combining -s|sg with -xn, or -s|sn with -xg will run only those tests that satisfy both criteria.
253
+
254
+
Specifying -xg or -xn in other combinations results in undefined behavior.
255
+
256
+
*NOTE* Be careful with *-p*:
257
+
258
+
* Some systems do not support this feature, in which case tests will fail
259
+
with a suitable message.
260
+
* Using *-p* to run tests in a separate process can have unexpected side
261
+
effects.
262
+
* While running tests in a separate process can help to get more information
263
+
about an unexpected crash, when an expected crash is part of the test scenario,
264
+
the *-p* command line option should not be used, but running in a separate
265
+
process should be enabled on a per-test basis like this:
0 commit comments