Skip to content

Commit 4cb08d6

Browse files
committed
[test] Exclude Python tests if Python not found
1 parent 46c8c33 commit 4cb08d6

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

roottest/root/ntuple/atlas-datavector/CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@ ROOTTEST_ADD_TEST(read
7878
# instantiation done by the Python bindings was leading to a faulty behaviour:
7979
# the user-provided class template "AtlasLikeDataVector<CustomStruct>" does not
8080
# correspond to what the compiler sees, so we need to inject this information.
81-
ROOT_ADD_PYUNITTEST(
82-
rentry_getptr
83-
rentry_getptr.py
84-
GENERIC
85-
PYTHON_DEPS pytest
86-
FIXTURES_REQUIRED atlas_datavector_write_done)
81+
if(ROOT_pyroot_FOUND)
82+
ROOT_ADD_PYUNITTEST(
83+
rentry_getptr
84+
rentry_getptr.py
85+
GENERIC
86+
PYTHON_DEPS pytest
87+
FIXTURES_REQUIRED atlas_datavector_write_done)
8788

88-
ROOT_ADD_PYUNITTEST(
89-
template_instantiation
90-
template_instantiation.py
91-
GENERIC
92-
PYTHON_DEPS pytest)
89+
ROOT_ADD_PYUNITTEST(
90+
template_instantiation
91+
template_instantiation.py
92+
GENERIC
93+
PYTHON_DEPS pytest)
94+
endif()

0 commit comments

Comments
 (0)