Skip to content
Snippets Groups Projects

Version 1.2

Merged Adrien Crovato requested to merge adri into master
34 files
+ 3306
139
Compare changes
  • Side-by-side
  • Inline
Files
34
+ 14
11
# 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()
Loading