summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/generate_lava.py
diff options
context:
space:
mode:
authorVasily Khoruzhick <[email protected]>2020-01-16 19:37:32 -0800
committerMarge Bot <[email protected]>2020-01-21 09:33:57 +0000
commit5e5b5348f605361cbfde3d7eff685e683c18af4a (patch)
treeb51da73345354a005fa1e1447ade72e3db4c1581 /.gitlab-ci/generate_lava.py
parent26d93a7495511ded7cca3ed46bcdf7e134c0f929 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3163>
Diffstat (limited to '.gitlab-ci/generate_lava.py')
-rwxr-xr-x.gitlab-ci/generate_lava.py4
1 files changed, 4 insertions, 0 deletions
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))