File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,22 @@ if(NOT Threads_FOUND)
37
37
endif ()
38
38
39
39
# Emulate autotools like make check target to build tests
40
- # set(CMAKE_CTEST_COMMAND ctest --progress --output-on-failure -j 4 )
41
-
40
+ set (CMAKE_CTEST_COMMAND ctest --progress --output-on-failure )
41
+ add_custom_target ( check COMMAND ${CMAKE_CTEST_COMMAND} )
42
42
enable_testing ()
43
43
44
44
include_directories (${GTEST_INCLUDE_DIR} )
45
45
link_directories (${GTEST_LIB_DIR} )
46
46
47
+ # TODO split
47
48
add_executable (dpnpc_tests
48
49
test_main.cpp
49
50
test_random.cpp
50
51
test_utils.cpp
51
52
test_utils_iterator.cpp )
52
53
target_link_libraries (dpnpc_tests GTest::GTest GTest::Main pthread dpnp_backend_c )
54
+
55
+ # TODO split
56
+ add_test (dpnpc_tests dpnpc_tests )
57
+ gtest_discover_tests (dpnpc_tests )
58
+ add_dependencies (check dpnpc_tests )
Original file line number Diff line number Diff line change @@ -311,5 +311,25 @@ jobs:
311
311
./scripts/install_system_deps.sh # no intel python
312
312
./scripts/install_python_deps.sh # numpy, conda-build and etc.
313
313
echo ========================= build DPNP package ===============================
314
- export DPNP_BACKEND_TESTS_ENABLE=1
315
314
./0.build.sh
315
+
316
+ # DPNP backend clib tests building and running
317
+ - job : test_dpnp_backend_clib_lin
318
+ displayName : test_dpnp_backend_clib_lin
319
+ pool :
320
+ vmImage : ' ubuntu-20.04'
321
+ steps :
322
+ - bash : |
323
+ . ./scripts/install_cmake_lin.sh
324
+ ./scripts/install_system_deps.sh # no intel python
325
+ echo ========================= build DPNP package ===============================
326
+ . /opt/intel/oneapi/setvars.sh
327
+ THEDIR=$(pwd)
328
+ cmake -S$THEDIR/dpnp/backend -B$THEDIR/build/ \
329
+ -DDPNP_INSTALL_PREFIX=$THEDIR/dpnp -DDPNP_INSTALL_STRUCTURED=OFF \
330
+ -DDPNP_BACKEND_TESTS:BOOL=ON $THEDIR/dpnp/backend
331
+ cmake --build $THEDIR/build
332
+ cmake --install $THEDIR/build
333
+ echo ======================= run DPNP backend tests =============================
334
+ cd $THEDIR/build/tests/
335
+ make check
You can’t perform that action at this time.
0 commit comments