From 02aa1d285a6cd6cc2203b8a20bd57f31f3796e9e Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 29 Jun 2022 11:15:22 -0400 Subject: [PATCH] Fix #1150, Set OSAL Loader unit test number of modules to OSAL_CONFIG_MAX_MODULES. --- src/unit-tests/osloader-test/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unit-tests/osloader-test/CMakeLists.txt b/src/unit-tests/osloader-test/CMakeLists.txt index 1c3159d9f..dbaece6ac 100644 --- a/src/unit-tests/osloader-test/CMakeLists.txt +++ b/src/unit-tests/osloader-test/CMakeLists.txt @@ -9,8 +9,9 @@ add_osal_ut_exe(osal_loader_UT ${TEST_MODULE_FILES}) # build many copies of the test module # we need to have unique modules to load up to OS_MAX_MODULES -# This will cover up to 32 -- extras are ignored. If needed this can be increased. -set(MOD 32) +# This will cover up to $OSAL_CONFIG_MAX_MODULES + 1. If needed +# this can be increased by increasing $OSAL_CONFIG_MAX_MODULES. +math(EXPR MOD "${OSAL_CONFIG_MAX_MODULES} + 1") while(MOD GREATER 0) math(EXPR MOD "${MOD} - 1") add_library(MODULE${MOD} SHARED ut_module.c)