[phpunit_concurrent] Pass parallel options from Gitlab job to run-test

Migrated issue

Reported by: fjgarlin

Related to !154 (merged) !148 (merged)

Problem/Motivation

run-tests.sh runs when _PHPUNIT_CONCURRENT is set to 1. The script accepts offset and index so we can split the tests in chunks automatically based on the GitLab parallel option. These parameters are currently not passed, so we cannot easily leverage this feature which is already available.

Steps to reproduce

Set parallel: 3 in the phpunit job and _PHPUNIT_CONCURRENT to 1. The whole set of tests is repeated three times.

Proposed resolution

Add the --ci-parallel-node-index $CI_NODE_INDEX --ci-parallel-node-total $CI_NODE_TOTAL options when calling run-tests.sh

Remaining tasks

MR and tests with and without parallel

Related issue: Issue #3426716

Edited by drupalbot