test: remove the hardcoded four-job valgrind test run

Make this dependent on the number of processes too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-11-05 00:54:32 +00:00
parent c6905dcd0b
commit bdd798778a
2 changed files with 3 additions and 2 deletions

View file

@ -959,7 +959,6 @@ if get_option('tests')
valgrind = find_program('valgrind', required : false)
if valgrind.found()
valgrind_env = environment()
valgrind_env.set('LITEST_JOBS', '4')
valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions')
add_test_setup('valgrind',
exe_wrapper : [ valgrind,

View file

@ -4274,7 +4274,9 @@ main(int argc, char **argv)
if (in_debugger || RUNNING_ON_VALGRIND)
setenv("CK_FORK", "no", 0);
jobs = get_nprocs() * 2;
jobs = get_nprocs();
if (!RUNNING_ON_VALGRIND)
jobs *= 2;
mode = litest_parse_argv(argc, argv);
if (mode == LITEST_MODE_ERROR)