Skip to content

Commit b404063

Browse files
committed
Use Cmakelist instead of makefile for test module
1 parent 147ca89 commit b404063

File tree

5 files changed

+8
-42
lines changed

5 files changed

+8
-42
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ ENDIF()
200200
#----------------------------------------------------------------------------------------------
201201

202202
ADD_SUBDIRECTORY(src)
203+
ADD_SUBDIRECTORY(tests/module)
203204
ADD_LIBRARY(redisai SHARED $<TARGET_OBJECTS:redisai_obj>)
204205

205206
TARGET_LINK_LIBRARIES(redisai ${CMAKE_DL_LIBS})

tests/flow/tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ valgrind_summary() {
9292
#----------------------------------------------------------------------------------------------
9393

9494
run_tests() {
95-
make -C ../module
9695
local title="$1"
9796
[[ ! -z $title ]] && { $ROOT/opt/readies/bin/sep -0; printf "Tests with $title:\n\n"; }
9897
cd $ROOT/tests/flow

tests/flow/tests_llapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
def ensure_test_module_loaded(f):
1313
@wraps(f)
1414
def wrapper(env, *args, **kwargs):
15-
goal_dir = os.path.join(os.path.dirname(__file__), "../module/LLAPI.so")
16-
TEST_MODULE_PATH = os.path.abspath(goal_dir)
15+
#goal_dir = os.path.join(os.path.dirname(__file__), "../module/testmod.so")
16+
TEST_MODULE_PATH = "{ROOT}/bin/linux-x64-release/src/tests/module/testmod.so".format(ROOT=ROOT)
1717
con = env.getConnection()
1818
modules = con.execute_command("MODULE", "LIST")
1919
if b'RAI_llapi' in [module[1] for module in modules]:

tests/module/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ADD_LIBRARY(testmod SHARED LLAPI.c DAG_utils.c)
2+
3+
INCLUDE_DIRECTORIES(../../src)
4+
SET_TARGET_PROPERTIES(testmod PROPERTIES PREFIX "")
5+
SET_TARGET_PROPERTIES(testmod PROPERTIES SUFFIX ".so")

tests/module/Makefile

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)