Skip to content

Commit 6976412

Browse files
authored
Reduce number of parallel executions when running tests with valgrind (#820)
1 parent 01d8d14 commit 6976412

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/flow/tests_gears_llapi.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,14 +315,18 @@ def test_modelset_modelget_ops(self):
315315
self.env.assertEqual(values, [b'2', b'3', b'2', b'3'])
316316

317317
def test_modelexecute_op(self):
318+
executions_num = 500
319+
320+
if VALGRIND:
321+
executions_num = 10
318322

319323
def multiple_executions(con):
320324
ret = con.execute_command('rg.trigger', 'DAGRun_test2')
321325
self.env.assertEqual(ret[0], b'test2_OK')
322326
values = con.execute_command('AI.TENSORGET', 'test2_res{1}', 'VALUES')
323327
self.env.assertEqual(values, [b'4', b'9', b'4', b'9'])
324328

325-
run_test_multiproc(self.env, '{1}', 500, multiple_executions)
329+
run_test_multiproc(self.env, '{1}', executions_num, multiple_executions)
326330

327331
def test_scriptexecute_op(self):
328332
con = get_connection(self.env, '{1}')

tests/flow/tests_llapi.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,14 @@ def test_dag_build_and_run(env):
102102
env.assertEqual(ret, b'DAG run success')
103103

104104
# Run the DAG LLAPI test again with multi process test to ensure that there are no dead-locks
105+
executions_num = 500
106+
if VALGRIND:
107+
executions_num = 10
108+
105109
def run_dag_llapi(con):
106110
con.execute_command("RAI_llapi.DAGrun")
107111

108-
run_test_multiproc(env, '{1}', 500, run_dag_llapi)
112+
run_test_multiproc(env, '{1}', executions_num, run_dag_llapi)
109113

110114

111115
@with_test_module

0 commit comments

Comments
 (0)