Skip to content
Snippets Groups Projects
Commit f16c1416 authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Deactivate AD tests when CoDi is not enabled

parent ece0f909
No related branches found
No related tags found
1 merge request!3Version 1.2
Pipeline #48159 passed with warnings
# Copyright 2023 University of Liège
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......@@ -18,14 +18,17 @@ MACRO(MACRO_AddTest srcDir)
file(GLOB tfiles RELATIVE ${srcDir} ${srcDir}/*)
foreach(tfile ${tfiles})
set(spath ${srcDir}/${tfile})
if(NOT IS_DIRECTORY ${spath} AND
${spath} MATCHES ".+\\.py$" AND
NOT ${tfile} STREQUAL "__init__.py")
string(REPLACE "${PROJECT_SOURCE_DIR}/" "" strip ${spath})
message(STATUS "Adding test ${strip}")
add_test(NAME ${strip}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND ${Python3_EXECUTABLE} "${PROJECT_SOURCE_DIR}/run.py" --nogui --clean ${strip})
if(NOT IS_DIRECTORY ${spath} AND ${spath} MATCHES ".+\\.py$" AND NOT ${tfile} STREQUAL "__init__.py")
if(${USE_CODI} MATCHES "OFF" AND ${tfile} MATCHES "._ad+\\.py$")
string(REPLACE "${PROJECT_SOURCE_DIR}/" "" strip ${spath})
message(STATUS "Skipping test ${strip}")
else()
string(REPLACE "${PROJECT_SOURCE_DIR}/" "" strip ${spath})
message(STATUS "Adding test ${strip}")
add_test(NAME ${strip}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND ${Python3_EXECUTABLE} "${PROJECT_SOURCE_DIR}/run.py" --nogui --clean ${strip})
endif()
else()
MACRO_AddTest(${srcDir}/${tfile})
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment