From: Vasily Khoruzhick Date: Fri, 17 Jan 2020 03:37:32 +0000 (-0800) Subject: ci: lava: pass CI_NODE_INDEX and CI_NODE_TOTAL to lava jobs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e5b5348f605361cbfde3d7eff685e683c18af4a;p=mesa.git ci: lava: pass CI_NODE_INDEX and CI_NODE_TOTAL to lava jobs deqp-runner.sh uses it to determine whether we split job across multiple devices and if we do what's the node index. With this change we now can set 'parallel: N' in job description if we want to split the job. Signed-off-by: Vasily Khoruzhick Part-of: --- diff --git a/.gitlab-ci/generate_lava.py b/.gitlab-ci/generate_lava.py index f83f0e8d4d3..f7631e1f30c 100755 --- a/.gitlab-ci/generate_lava.py +++ b/.gitlab-ci/generate_lava.py @@ -16,6 +16,8 @@ parser.add_argument("--lava-tags", nargs='?', default="") parser.add_argument("--env-vars", nargs='?', default="") parser.add_argument("--deqp-version") parser.add_argument("--arch") +parser.add_argument("--ci-node-index") +parser.add_argument("--ci-node-total") args = parser.parse_args() env = Environment(loader = FileSystemLoader(os.path.dirname(args.template)), trim_blocks=True, lstrip_blocks=True) @@ -32,6 +34,8 @@ values['tags'] = args.lava_tags values['env_vars'] = args.env_vars values['deqp_version'] = args.deqp_version values['arch'] = args.arch +values['ci_node_index'] = args.ci_node_index +values['ci_node_total'] = args.ci_node_total f = open('lava-deqp.yml', "w") f.write(template.render(values)) diff --git a/.gitlab-ci/lava-deqp.yml.jinja2 b/.gitlab-ci/lava-deqp.yml.jinja2 index c974a66788d..73101a7aa85 100644 --- a/.gitlab-ci/lava-deqp.yml.jinja2 +++ b/.gitlab-ci/lava-deqp.yml.jinja2 @@ -70,6 +70,8 @@ actions: - export DEQP_SKIPS=deqp-{{ gpu_version }}-skips.txt - export DEQP_VER={{ deqp_version }} - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri + - export CI_NODE_INDEX={{ ci_node_index }} + - export CI_NODE_TOTAL={{ ci_node_total }} # Put stuff where the runner script expects it - mkdir artifacts diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml index d5bdb922448..0f1886c2a23 100644 --- a/.gitlab-ci/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -19,7 +19,9 @@ --kernel-image-type "${KERNEL_IMAGE_TYPE}" \ --gpu-version ${GPU_VERSION} \ --boot-method ${BOOT_METHOD} \ - --lava-tags "${LAVA_TAGS}" + --lava-tags "${LAVA_TAGS}" \ + --ci-node-index "${CI_NODE_INDEX}" \ + --ci-node-total "${CI_NODE_TOTAL}" - lava_job_id=`lavacli jobs submit lava-deqp.yml` - echo $lava_job_id - rm -rf artifacts/*