Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
80f20047
Commit
80f20047
authored
Sep 24, 2002
by
Andy Cedilnik
Browse files
Add verbose flag -V, which makes the output of tests to be displayed; also add help to ctest
parent
b5de000f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/ctest.cxx
View file @
80f20047
...
...
@@ -228,7 +228,7 @@ void ctest::ProcessDirectory(std::vector<std::string> &passed,
cmSystemTools
::
ReplaceString
(
output
,
dartStuff
.
match
(
1
).
c_str
(),
""
);
}
if
(
output
!=
""
)
if
(
output
!=
""
&&
m_Verbose
)
{
std
::
cerr
<<
output
.
c_str
()
<<
"
\n
"
;
}
...
...
@@ -245,7 +245,7 @@ void ctest::ProcessDirectory(std::vector<std::string> &passed,
cmSystemTools
::
ReplaceString
(
output
,
dartStuff
.
match
(
1
).
c_str
(),
""
);
}
if
(
output
!=
""
)
if
(
output
!=
""
&&
m_Verbose
)
{
std
::
cerr
<<
output
.
c_str
()
<<
"
\n
"
;
}
...
...
@@ -266,6 +266,7 @@ int main (int argc, char *argv[])
std
::
vector
<
std
::
string
>
failed
;
int
total
;
ctest
inst
;
// look at the args
...
...
@@ -282,6 +283,11 @@ int main (int argc, char *argv[])
{
inst
.
m_ConfigType
=
args
[
i
+
1
];
}
if
(
arg
.
find
(
"-V"
,
0
)
==
0
||
arg
.
find
(
"--verbose"
,
0
)
==
0
)
{
inst
.
m_Verbose
=
true
;
}
if
(
arg
.
find
(
"-R"
,
0
)
==
0
&&
i
<
args
.
size
()
-
1
)
{
...
...
@@ -295,6 +301,25 @@ int main (int argc, char *argv[])
inst
.
m_ExcludeRegExp
=
args
[
i
+
1
];
inst
.
m_UseExcludeRegExpFirst
=
inst
.
m_UseIncludeRegExp
?
false
:
true
;
}
if
(
arg
.
find
(
"-h"
)
==
0
||
arg
.
find
(
"-help"
)
==
0
||
arg
.
find
(
"-H"
)
==
0
||
arg
.
find
(
"--help"
)
==
0
||
arg
.
find
(
"/H"
)
==
0
||
arg
.
find
(
"/HELP"
)
==
0
||
arg
.
find
(
"/?"
)
==
0
)
{
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" <options>"
<<
std
::
endl
<<
"
\t
-D type Specify config type"
<<
std
::
endl
<<
"
\t
-E test Specify regular expression for tests to exclude"
<<
std
::
endl
<<
"
\t
-R test Specify regular expression for tests to include"
<<
std
::
endl
<<
"
\t
-V Verbose testing"
<<
std
::
endl
<<
"
\t
-H Help page"
<<
std
::
endl
;
return
1
;
}
}
// call process directory
...
...
Source/ctest.h
View file @
80f20047
...
...
@@ -38,9 +38,10 @@ public:
* constructor
*/
ctest
()
{
m_UseIncludeRegExp
=
false
;
m_UseExcludeRegExp
=
false
;
m_UseIncludeRegExp
=
false
;
m_UseExcludeRegExp
=
false
;
m_UseExcludeRegExpFirst
=
false
;
m_Verbose
=
false
;
}
bool
m_UseIncludeRegExp
;
...
...
@@ -51,6 +52,7 @@ public:
std
::
string
m_ExcludeRegExp
;
std
::
string
m_ConfigType
;
bool
m_Verbose
;
private:
};
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment