def wrapCommand(self, module, cmd, env): if self.options.valgrind: res = ['valgrind'] 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) has_gtest_filter = next( (True for x in cmd if x.startswith('--gtest_filter=')), False) return res + cmd + ([ longTestFilter(LONG_TESTS_DEBUG_VALGRIND, module) ] if not has_gtest_filter else []) elif self.options.qemu: import shlex res = shlex.split(self.options.qemu) for (name, value) in [ entry for entry in os.environ.items() if entry[0].startswith('OPENCV') and not entry[0] in env ]: res += ['-E', '"{}={}"'.format(name, value)] for (name, value) in env.items(): res += ['-E', '"{}={}"'.format(name, value)] return res + ['--'] + cmd return cmd
def wrapInValgrind(self, cmd = []): if self.options.valgrind: res = ['valgrind'] if self.options.valgrind_supp: res.append("--suppressions=%s" % self.options.valgrind_supp) res.extend(self.options.valgrind_opt) return res + cmd + [longTestFilter(LONG_TESTS_DEBUG_VALGRIND)] return cmd
def wrapInValgrind(self, cmd = []): if self.options.valgrind: res = ['valgrind'] 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) 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 wrapInValgrind(self, cmd=[]): if self.options.valgrind: res = ['valgrind'] 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) 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 wrapCommand(self, module, cmd, env): if self.options.valgrind: res = ['valgrind'] 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) has_gtest_filter = next((True for x in cmd if x.startswith('--gtest_filter=')), False) return res + cmd + ([longTestFilter(LONG_TESTS_DEBUG_VALGRIND, module)] if not has_gtest_filter else []) elif self.options.qemu: import shlex res = shlex.split(self.options.qemu) for (name, value) in [entry for entry in os.environ.items() if entry[0].startswith('OPENCV') and not entry[0] in env]: res += ['-E', '"{}={}"'.format(name, value)] for (name, value) in env.items(): res += ['-E', '"{}={}"'.format(name, value)] return res + ['--'] + cmd return cmd