Run tests from testing during CI
MODIFY
.gitlab-ci.yml
.gitlab-ci.yml
@@ -55,15 +55,16 @@ build:rocm:
script:
- mkdir build
- cd build
- # CXX=hcc cmake -DBUILD_TEST=ON -DBUILD_EXAMPLE=ON -DBUILD_BENCHMARK=ON ../.
- CXX=hcc cmake -DBUILD_TEST=ON ../.
- - make -j16
+ - make -j $(nproc)
- make package
artifacts:
paths:
- - build/library/
+ - build/thrust/
- build/test/test_*
- build/test/CTestTestfile.cmake
+ - build/testing/test_thrust_*
+ - build/testing/CTestTestfile.cmake
- build/gtest/
- build/CMakeCache.txt
- build/CTestTestfile.cmake
@@ -79,7 +80,7 @@ build:rocm:
- build:rocm
script:
- cd build
- - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 2
+ - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 1
include: '.gitlab-ci-gputest.yml'
@@ -109,7 +110,7 @@ test:rocm_package:
- mkdir ../package_test && cd ../package_test
- CXX=hcc cmake ../extra/. -Drocprim_DIR="/opt/rocm/rocprim"
- make VERBOSE=1
- - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 2
+ - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 1
- $SUDO_CMD dpkg -r rocthrust
- $SUDO_CMD dpkg -r rocprim
@@ -128,4 +129,4 @@ test:rocm_install:
- mkdir ../install_test && cd ../install_test
- CXX=hcc cmake ../extra/.
- make VERBOSE=1
- - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 2
+ - $SUDO_CMD ctest --output-on-failure --repeat-until-fail 1

MODIFY
testing/CMakeLists.txt
testing/CMakeLists.txt
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-function(add_thrust_test TEST_TARGET)
- set(TEST_SOURCE "${TEST_TARGET}.cu")
+function(add_thrust_test TEST)
+ set(TEST_SOURCE "${TEST}.cu")
+ set(TEST_TARGET "test_thrust_${TEST}")
set_source_files_properties(${TEST_SOURCE} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "-x c++")
add_executable(${TEST_TARGET} ${TEST_SOURCE} testframework.cpp)
target_include_directories(${TEST_TARGET} SYSTEM BEFORE
@@ -45,7 +46,7 @@ function(add_thrust_test TEST_TARGET)
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/testing/"
)
- add_test("thrust.${TEST_TARGET}" ${TEST_TARGET})
+ add_test("thrust.${TEST}" ${TEST_TARGET})
endfunction()
# ****************************************************************************

Run tests from testing during CI