1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

ts: update valgrind suppressions

This commit is contained in:
Alexander Alekhin
2017-07-21 16:42:28 +03:00
parent 402a77e7f7
commit bf0173bf38
7 changed files with 324 additions and 10 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ prefilterXSobel( const Mat& src, Mat& dst, int ftzero )
{
int x, y;
const int OFS = 256*4, TABSZ = OFS*2 + 256;
uchar tab[TABSZ];
uchar tab[TABSZ] = { 0 };
Size size = src.size();
for( x = 0; x < TABSZ; x++ )
+1 -1
View File
@@ -1547,7 +1547,7 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
bool haveMask = _mask.kind() != _InputArray::NONE;
int nz = haveMask ? -1 : (int)_src.total();
Scalar mean, stddev;
Scalar mean(0), stddev(0);
const int cn = _src.channels();
if (cn > 4)
return false;
+1 -1
View File
@@ -37,7 +37,7 @@ if __name__ == "__main__":
# Valgrind
parser.add_argument("--valgrind", action="store_true", default=False, help="Run C++ tests in valgrind")
parser.add_argument("--valgrind_supp", metavar="FILE", help="Path to valgrind suppression file (example: --valgrind_supp opencv/platforms/scripts/valgrind.supp)")
parser.add_argument("--valgrind_supp", metavar="FILE", action='append', help="Path to valgrind suppression file (example: --valgrind_supp opencv/platforms/scripts/valgrind.supp)")
parser.add_argument("--valgrind_opt", metavar="OPT", action="append", default=[], help="Add command line option to valgrind (example: --valgrind_opt=--leak-check=full)")
# Android
+8 -3
View File
@@ -103,10 +103,15 @@ class TestSuite(object):
def wrapInValgrind(self, cmd = []):
if self.options.valgrind:
res = ['valgrind']
if self.options.valgrind_supp:
res.append("--suppressions=%s" % self.options.valgrind_supp)
supp = self.options.valgrind_supp or []
for f in supp:
if os.path.isfile(f):
res.append("--suppressions=%s" % f)
else:
print("WARNING: Valgrind suppression file is missing, SKIP: %s" % f)
res.extend(self.options.valgrind_opt)
return res + cmd + [longTestFilter(LONG_TESTS_DEBUG_VALGRIND)]
has_gtest_filter = next((True for x in cmd if x.startswith('--gtest_filter=')), False)
return res + cmd + ([longTestFilter(LONG_TESTS_DEBUG_VALGRIND)] if not has_gtest_filter else [])
return cmd
def tryCommand(self, cmd):