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
d411041c
Commit
d411041c
authored
Oct 17, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Oct 17, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1637 from SpecLad:run-py-java-fix
parents
7605426d
5bb6949b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
CMakeLists.txt
modules/java/test/CMakeLists.txt
+16
-10
build.xml
modules/java/test/build.xml
+5
-4
run.py
modules/ts/misc/run.py
+4
-1
No files found.
modules/java/test/CMakeLists.txt
View file @
d411041c
...
...
@@ -10,6 +10,9 @@ set(opencv_test_java_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/.build")
set
(
android_source_dir
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../android_test"
)
set
(
java_source_dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
# make sure the build directory exists
file
(
MAKE_DIRECTORY
"
${
opencv_test_java_bin_dir
}
"
)
# get project sources
file
(
GLOB_RECURSE opencv_test_java_files RELATIVE
"
${
android_source_dir
}
"
"
${
android_source_dir
}
/res/*"
"
${
android_source_dir
}
/src/*.java"
)
# These are the files that need to be updated for pure Java.
...
...
@@ -58,14 +61,6 @@ add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build.xml"
COMMENT
"Copying build.xml"
)
# Create a script for running the Java tests and place it in build/bin.
#if(WIN32)
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java.cmd" "cd ${opencv_test_java_bin_dir}\nset PATH=${EXECUTABLE_OUTPUT_PATH}/Release;%PATH%\nant -DjavaLibraryPath=${EXECUTABLE_OUTPUT_PATH}/Release buildAndTest")
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java_D.cmd" "cd ${opencv_test_java_bin_dir}\nset PATH=${EXECUTABLE_OUTPUT_PATH}/Debug;%PATH%\nant -DjavaLibraryPath=${EXECUTABLE_OUTPUT_PATH}/Debug buildAndTest")
#else()
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java.sh" "cd ${opencv_test_java_bin_dir};\nant -DjavaLibraryPath=${LIBRARY_OUTPUT_PATH} buildAndTest;\ncd -")
#endif()
add_custom_command
(
OUTPUT
"
${
opencv_test_java_bin_dir
}
/build/jar/opencv-test.jar"
COMMAND
"
${
ANT_EXECUTABLE
}
"
build
WORKING_DIRECTORY
"
${
opencv_test_java_bin_dir
}
"
...
...
@@ -73,8 +68,19 @@ add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar
COMMENT
"Build Java tests"
)
add_custom_target
(
${
PROJECT_NAME
}
ALL SOURCES
"
${
opencv_test_java_bin_dir
}
/build/jar/opencv-test.jar"
)
add_dependencies
(
${
PROJECT_NAME
}
${
the_module
}
)
# Not add_custom_command because generator expressions aren't supported in
# OUTPUT file names, and we need to generate different files for different
# configurations.
add_custom_target
(
${
PROJECT_NAME
}
_properties
COMMAND
"
${
CMAKE_COMMAND
}
"
-E echo
"opencv.lib.path = $<TARGET_FILE_DIR:
${
the_module
}
>"
>
"
${
opencv_test_java_bin_dir
}
/ant-$<CONFIGURATION>.properties"
VERBATIM
)
add_custom_target
(
${
PROJECT_NAME
}
ALL
DEPENDS
${
the_module
}
${
PROJECT_NAME
}
_properties
SOURCES
"
${
opencv_test_java_bin_dir
}
/build/jar/opencv-test.jar"
)
if
(
ENABLE_SOLUTION_FOLDERS
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES FOLDER
"tests accuracy"
)
...
...
modules/java/test/build.xml
View file @
d411041c
<project>
<property
file=
"ant-${opencv.build.type}.properties"
/>
<path
id=
"master-classpath"
>
<fileset
dir=
"lib"
>
<include
name=
"*.jar"
/>
...
...
@@ -34,8 +36,8 @@
<target
name=
"test"
>
<mkdir
dir=
"testResults"
/>
<junit
printsummary=
"true"
haltonfailure=
"false"
haltonerror=
"false"
showoutput=
"false"
logfailedtests=
"true"
maxmemory=
"256m"
>
<sysproperty
key=
"java.library.path"
path=
"${
javaLibraryP
ath}"
/>
<env
key=
"PATH"
path=
"${
javaLibraryP
ath}"
/>
<sysproperty
key=
"java.library.path"
path=
"${
opencv.lib.p
ath}"
/>
<env
key=
"PATH"
path=
"${
opencv.lib.p
ath}"
/>
<classpath
refid=
"master-classpath"
/>
<classpath>
<pathelement
location=
"build/classes"
/>
...
...
@@ -61,4 +63,4 @@
<antcall
target=
"jar"
/>
<antcall
target=
"test"
/>
</target>
</project>
\ No newline at end of file
</project>
modules/ts/misc/run.py
View file @
d411041c
...
...
@@ -759,7 +759,10 @@ class TestSuite(object):
return
hostlogpath
return
None
elif
path
==
"java"
:
cmd
=
[
self
.
ant_executable
,
"-DjavaLibraryPath="
+
self
.
tests_dir
,
"buildAndTest"
]
cmd
=
[
self
.
ant_executable
,
"-Dopencv.build.type="
+
(
self
.
options
.
configuration
if
self
.
options
.
configuration
else
self
.
build_type
),
"buildAndTest"
]
print
>>
_stderr
,
"Run command:"
,
" "
.
join
(
cmd
)
try
:
...
...
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