Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
4c7d5214
Commit
4c7d5214
authored
Aug 30, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12346 from mshabunin:test-data-check
parents
258a7695
cecf8441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ts.cpp
modules/ts/src/ts.cpp
+4
-1
No files found.
modules/ts/src/ts.cpp
View file @
4c7d5214
...
...
@@ -721,6 +721,7 @@ void checkIppStatus()
}
}
static
bool
checkTestData
=
false
;
bool
skipUnstableTests
=
false
;
bool
runBigDataTests
=
false
;
int
testThreads
=
0
;
...
...
@@ -733,6 +734,7 @@ void parseCustomOptions(int argc, char **argv)
"{ test_threads |-1 |the number of worker threads, if parallel execution is enabled}"
"{ skip_unstable |false |skip unstable tests }"
"{ test_bigdata |false |run BigData tests (>=2Gb) }"
"{ test_require_data |false |fail on missing non-required test data instead of skip}"
"{ h help |false |print help info }"
;
cv
::
CommandLineParser
parser
(
argc
,
argv
,
command_line_keys
);
...
...
@@ -756,6 +758,7 @@ void parseCustomOptions(int argc, char **argv)
skipUnstableTests
=
parser
.
get
<
bool
>
(
"skip_unstable"
);
runBigDataTests
=
parser
.
get
<
bool
>
(
"test_bigdata"
);
checkTestData
=
parser
.
get
<
bool
>
(
"test_require_data"
);
}
...
...
@@ -870,7 +873,7 @@ static std::string findData(const std::string& relative_path, bool required, boo
#endif
#endif
const
char
*
type
=
findDirectory
?
"directory"
:
"data file"
;
if
(
required
)
if
(
required
||
checkTestData
)
CV_Error
(
cv
::
Error
::
StsError
,
cv
::
format
(
"OpenCV tests: Can't find required %s: %s"
,
type
,
relative_path
.
c_str
()));
throw
SkipTestException
(
cv
::
format
(
"OpenCV tests: Can't find %s: %s"
,
type
,
relative_path
.
c_str
()));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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