Commit 8577f718 authored by Alexander Alekhin's avatar Alexander Alekhin

ts: 2.4 changes

parent 6f00e531
...@@ -85,7 +85,7 @@ class TestSuite(object): ...@@ -85,7 +85,7 @@ class TestSuite(object):
return set(res) return set(res)
def isTest(self, fullpath): def isTest(self, fullpath):
if fullpath in ['java', 'python2', 'python3']: if fullpath in ['java', 'python', 'python2', 'python3']:
return self.options.mode == 'test' return self.options.mode == 'test'
if not os.path.isfile(fullpath): if not os.path.isfile(fullpath):
return False return False
...@@ -117,7 +117,7 @@ class TestSuite(object): ...@@ -117,7 +117,7 @@ class TestSuite(object):
cmd = [self.cache.ant_executable, "-Dopencv.build.type=%s" % self.cache.build_type, "buildAndTest"] cmd = [self.cache.ant_executable, "-Dopencv.build.type=%s" % self.cache.build_type, "buildAndTest"]
ret = execute(cmd, cwd = self.cache.java_test_binary_dir + "/.build") ret = execute(cmd, cwd = self.cache.java_test_binary_dir + "/.build")
return None, ret return None, ret
elif path in ['python2', 'python3']: elif path in ['python', 'python2', 'python3']:
executable = os.getenv('OPENCV_PYTHON_BINARY', None) executable = os.getenv('OPENCV_PYTHON_BINARY', None)
if executable is None: if executable is None:
executable = path executable = path
...@@ -164,7 +164,7 @@ class TestSuite(object): ...@@ -164,7 +164,7 @@ class TestSuite(object):
more_args = [] more_args = []
exe = self.getTest(test) exe = self.getTest(test)
if exe in ["java", "python2", "python3"]: if exe in ["java", "python", "python2", "python3"]:
logname = None logname = None
else: else:
userlog = [a for a in args if a.startswith("--gtest_output=")] userlog = [a for a in args if a.startswith("--gtest_output=")]
......
...@@ -175,6 +175,7 @@ parse_patterns = ( ...@@ -175,6 +175,7 @@ parse_patterns = (
{'name': "cuda_library", 'default': None, 'pattern': re.compile(r"^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$")}, {'name': "cuda_library", 'default': None, 'pattern': re.compile(r"^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$")},
{'name': "cuda_version", 'default': None, 'pattern': re.compile(r"^CUDA_VERSION:STRING=(.+)$")}, {'name': "cuda_version", 'default': None, 'pattern': re.compile(r"^CUDA_VERSION:STRING=(.+)$")},
{'name': "core_dependencies", 'default': None, 'pattern': re.compile(r"^opencv_core_LIB_DEPENDS:STATIC=(.+)$")}, {'name': "core_dependencies", 'default': None, 'pattern': re.compile(r"^opencv_core_LIB_DEPENDS:STATIC=(.+)$")},
{'name': "python", 'default': None, 'pattern': re.compile(r"^BUILD_opencv_python:BOOL=(.*)$")},
{'name': "python2", 'default': None, 'pattern': re.compile(r"^BUILD_opencv_python2:BOOL=(.*)$")}, {'name': "python2", 'default': None, 'pattern': re.compile(r"^BUILD_opencv_python2:BOOL=(.*)$")},
{'name': "python3", 'default': None, 'pattern': re.compile(r"^BUILD_opencv_python3:BOOL=(.*)$")}, {'name': "python3", 'default': None, 'pattern': re.compile(r"^BUILD_opencv_python3:BOOL=(.*)$")},
) )
...@@ -253,6 +254,8 @@ class CMakeCache: ...@@ -253,6 +254,8 @@ class CMakeCache:
files = glob.glob(os.path.join(d, mask)) files = glob.glob(os.path.join(d, mask))
if not self.getOS() == "android" and self.withJava(): if not self.getOS() == "android" and self.withJava():
files.append("java") files.append("java")
if self.withPython():
files.append("python")
if self.withPython2(): if self.withPython2():
files.append("python2") files.append("python2")
if self.withPython3(): if self.withPython3():
...@@ -261,7 +264,7 @@ class CMakeCache: ...@@ -261,7 +264,7 @@ class CMakeCache:
return [] return []
def isMainModule(self, name): def isMainModule(self, name):
return name in self.main_modules + ['python2', 'python3'] return name in self.main_modules + ['python', 'python2', 'python3']
def withCuda(self): def withCuda(self):
return self.cuda_version and self.with_cuda == "ON" and self.cuda_library and not self.cuda_library.endswith("-NOTFOUND") return self.cuda_version and self.with_cuda == "ON" and self.cuda_library and not self.cuda_library.endswith("-NOTFOUND")
...@@ -269,6 +272,9 @@ class CMakeCache: ...@@ -269,6 +272,9 @@ class CMakeCache:
def withJava(self): def withJava(self):
return self.ant_executable and self.java_test_binary_dir return self.ant_executable and self.java_test_binary_dir
def withPython(self):
return self.python == 'ON'
def withPython2(self): def withPython2(self):
return self.python2 == 'ON' return self.python2 == 'ON'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment