File tree 2 files changed +52
-6
lines changed
bindings/pyroot/cppyy/cppyy/test
2 files changed +52
-6
lines changed Original file line number Diff line number Diff line change 4
4
# For the licensing terms see $ROOTSYS/LICENSE.
5
5
# For the list of contributors see $ROOTSYS/README/CREDITS.
6
6
7
- add_custom_target (cppyy_tests_dict ALL COMMAND make all WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /bindings/pyroot/cppyy/cppyy/test )
7
+ # Dictionary list
8
+ set (CPPYY_TEST_DICTS
9
+ advancedcpp
10
+ advancedcpp2
11
+ conversions
12
+ cpp11features
13
+ crossinheritance
14
+ datatypes
15
+ doc_helper
16
+ example01
17
+ fragile
18
+ operators
19
+ overloads
20
+ pythonizables
21
+ std_streams
22
+ templates
23
+ stltypes)
8
24
9
- file (GLOB CPPYY_TEST_SRC "test_*.py" )
25
+ foreach (DICT ${CPPYY_TEST_DICTS} )
26
+ # Generate dictionary for the tests
27
+ ROOT_GENERATE_DICTIONARY(G__${DICT} ${CMAKE_CURRENT_SOURCE_DIR} /${DICT} .h ${CMAKE_CURRENT_SOURCE_DIR} /${DICT} .xml NOINSTALL)
28
+ # Create shared necessary libraries for the tests
29
+ ROOT_LINKER_LIBRARY(${DICT} ${CMAKE_CURRENT_SOURCE_DIR} /${DICT} .cxx NOINSTALL LIBRARIES Python3::Python)
30
+ endforeach ()
10
31
11
- foreach (CPPYY_TEST_FILE ${CPPYY_TEST_SRC} )
12
- get_filename_component (CPPYY_TEST_FILE_NAME ${CPPYY_TEST_FILE} NAME )
13
- string (REPLACE ".py" "" CPPYY_TEST_FILE_NO_EXT ${CPPYY_TEST_FILE_NAME} )
32
+ # Tests list
33
+ set (CPPYY_TESTS
34
+ test_aclassloader
35
+ test_advancedcpp
36
+ test_api
37
+ test_boost
38
+ test_conversions
39
+ test_cpp11features
40
+ test_crossinheritance
41
+ test_datatypes
42
+ test_doc_features
43
+ test_eigen
44
+ test_fragile
45
+ test_leakcheck
46
+ test_lowlevel
47
+ test_numba
48
+ test_operators
49
+ test_overloads
50
+ test_pythonify
51
+ test_pythonization
52
+ test_regression
53
+ test_stltypes
54
+ test_streams
55
+ test_templates
56
+ test_concurrent)
14
57
15
- ROOT_ADD_PYUNITTEST(${CPPYY_TEST_FILE_NO_EXT} ${CPPYY_TEST_FILE_NAME} GENERIC PYTHON_DEPS pytest ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_CURRENT_SOURCE_DIR} )
58
+ # Configure the tests
59
+ foreach (TEST ${CPPYY_TESTS} )
60
+ ROOT_ADD_PYUNITTEST(${TEST} ${TEST} .py GENERIC ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_CURRENT_SOURCE_DIR} PYTHON_DEPS pytest)
16
61
endforeach ()
Original file line number Diff line number Diff line change @@ -304,5 +304,6 @@ def test(i, state=State):
304
304
assert State .c1 == 1000
305
305
assert State .c2 == State .c3
306
306
307
+
307
308
if __name__ == "__main__" :
308
309
exit (pytest .main (args = [__file__ ]))
You can’t perform that action at this time.
0 commit comments