Commit 579fa769 authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Merge branch 'feature/jorgen.lind/test_report' into 'master'

Add unittest report for gtest and testng (java)

See merge request !588
parents aa6e30ef 3797bc10
Pipeline #99379 passed with stages
in 192 minutes and 10 seconds
......@@ -169,6 +169,12 @@ unit-tests:
- ctest -V
only:
- merge_requests
artifacts:
when: always
reports:
junit:
- build/test_results/*.xml
- build/test_results_java/junitreports/*.xml
unit-tests-manylinux:
stage: test
image: "$SHA_MANYLINUX_IMAGE_TAG"
......@@ -179,6 +185,12 @@ unit-tests-manylinux:
- ctest -V
only:
- merge_requests
artifacts:
when: always
reports:
junit:
- build-manylinux/test_results/*.xml
- build-manylinux/test_results_java/junitreports/*.xml
unit-tests-centos7dev7:
stage: test
image: "$SHA_CENTOS7DEV7_IMAGE_TAG"
......@@ -189,6 +201,12 @@ unit-tests-centos7dev7:
- ctest -V
only:
- merge_requests
artifacts:
when: always
reports:
junit:
- build-centos7dev7/test_results/*.xml
- build-centos7dev7/test_results_java/junitreports/*.xml
pages:
stage: deploy
image: "$SHA_IMAGE_TAG"
......
......@@ -25,7 +25,10 @@ function(add_test_executable name)
addSystemHeadersToTarget(${name} "${include_3rdparty}")
target_compile_definitions(${name} PRIVATE openvds_EXPORTS)
add_dependencies(${name} TestRootTarget)
gtest_discover_tests(${name} DISCOVERY_TIMEOUT 15)
gtest_discover_tests(${name}
DISCOVERY_TIMEOUT 25
XML_OUTPUT_DIR ${PROJECT_BINARY_DIR}/test_results
)
setCommonTargetProperties(${name})
set_target_properties(${name} PROPERTIES FOLDER tests)
get_target_property(fmt_INCLUDE fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
......
......@@ -10,6 +10,6 @@ get_property(BUILT_JAR_TEST_FILE TARGET openvds-java-test PROPERTY JAR_FILE)
add_test(NAME "Java.Java.AllJavaTests"
COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$<TARGET_FILE_DIR:openvds-javacpp>"
${Java_JAVA_EXECUTABLE} -XX:+CreateMinidumpOnCrash -cp "${testng_SOURCE_FILE}${separator}${jcommander_SOURCE_FILE}${separator}${BUILT_JAR_FILE}${separator}${BUILT_JAR_TEST_FILE}" org.testng.TestNG -testjar ${BUILT_JAR_TEST_FILE} -log 2
${Java_JAVA_EXECUTABLE} -XX:+CreateMinidumpOnCrash -cp "${testng_SOURCE_FILE}${separator}${jcommander_SOURCE_FILE}${separator}${BUILT_JAR_FILE}${separator}${BUILT_JAR_TEST_FILE}" org.testng.TestNG -testjar ${BUILT_JAR_TEST_FILE} -log 2 -d ${PROJECT_BINARY_DIR}/test_results_java
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/java"
)
Supports Markdown
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