Files
openairinterface5g/openair1/SIMULATION/tests/RunTimedTest.cmake
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

44 lines
1.4 KiB
CMake

# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# this script expects
# - TEST_CMD (program + options)
# - CHECK_SCRIPT (path to analyze-timing.sh)
# further, it analyzes the (test-specific) environment for CHECK_0, CHECK_1,
# etc. to construct the input to the check script.
# the calling process writes env vars CHECK_0, CHECK_1, ...
# each has "condition;threshold" as it's content
# combine all necessary CHECK0, CHECK1, ... into a single array CHECKS
# to be passed to the check script
foreach(count RANGE 9)
set(CHECK "CHECK_${count}")
if (NOT DEFINED ENV{${CHECK}})
break()
endif()
list(APPEND CHECKS "$ENV{${CHECK}}")
endforeach()
# execute the actual test command TEST_CMD and pipe its output into the
# check script. Afterwards, check both commands return codes.
execute_process(COMMAND ${TEST_CMD}
COMMAND ${CHECK_SCRIPT} ${CHECKS}
COMMAND_ECHO STDOUT
RESULTS_VARIABLE RET_CODES
)
list(LENGTH RET_CODES LEN_RET_CODES)
if(NOT LEN_RET_CODES EQUAL 2)
message(SEND_ERROR "execute_process() did not run both commands!")
endif()
list(GET RET_CODES 0 TEST_RET_CODE)
message(STATUS "test command finished with ${TEST_RET_CODE}")
if(NOT ${TEST_RET_CODE} MATCHES "0")
message(SEND_ERROR " => test failed!")
endif()
list(GET RET_CODES 1 CHECK_RET_CODE)
message(STATUS "check command finished with ${CHECK_RET_CODE}")
if(NOT ${CHECK_RET_CODE} MATCHES "0")
message(SEND_ERROR " => check failed!")
endif()