@@ -13,11 +13,12 @@ def wrapper(env, *args, **kwargs):
1313 if b'rg' in [module [1 ] for module in modules ]:
1414 return f (env , * args , ** kwargs )
1515 try :
16- redisgears_path = os .path .join (os .path .dirname (__file__ ), 'bin/RedisGears/redisgears.so' )
17- python_plugin_path = os .path .join (os .path .dirname (__file__ ), 'bin/RedisGears/plugin/gears_python.so' )
18- python_env_path = os .path .join (os .path .dirname (__file__ ), 'bin/RedisGears' )
16+ platform = paella .Platform ()
17+ redisgears_dir = "{ROOT}/bin/{PLATFORM}/RedisGears" .format (ROOT = ROOT , PLATFORM = platform .triplet ())
18+ redisgears_path = os .path .join (redisgears_dir , 'redisgears.so' )
19+ python_plugin_path = os .path .join (redisgears_dir , 'plugin/gears_python.so' )
1920 ret = con .execute_command ('MODULE' , 'LOAD' , redisgears_path , 'Plugin' , python_plugin_path , 'CreateVenv' ,
20- 0 , 'PythonInstallationDir' , python_env_path )
21+ 0 , 'PythonInstallationDir' , redisgears_dir )
2122 env .assertEqual (ret , b'OK' )
2223 except Exception as e :
2324 env .debugPrint (str (e ), force = True )
@@ -44,7 +45,7 @@ def ping(record):
4445
4546
4647@skip_if_gears_not_loaded
47- def ntest_model_run (env ):
48+ def test_model_run (env ):
4849 script = '''
4950
5051import redisAI
@@ -119,7 +120,7 @@ async def ModelRun_AsyncRunError(record):
119120
120121
121122@skip_if_gears_not_loaded
122- def ntest_script_run (env ):
123+ def test_script_run (env ):
123124 script = '''
124125
125126import redisAI
@@ -198,7 +199,7 @@ async def ScriptRun_AsyncRunError(record):
198199
199200
200201@skip_if_gears_not_loaded
201- def ntest_DAG_run_via_gears (env ):
202+ def test_DAG_run_via_gears (env ):
202203 script = '''
203204
204205import redisAI
@@ -322,3 +323,4 @@ async def DAGRun_addOpsFromString(record):
322323
323324 values = con .execute_command ('AI.TENSORGET' , 'test5_res{1}' , 'VALUES' )
324325 env .assertEqual (values , [b'4' , b'9' , b'4' , b'9' ])
326+
0 commit comments