lava: Set default shell for submitted jobs
authorKienan Stewart <kstewart@efficios.com>
Tue, 23 May 2023 18:49:04 +0000 (14:49 -0400)
committerKienan Stewart <kstewart@efficios.com>
Wed, 24 May 2023 12:55:30 +0000 (08:55 -0400)
With the older lava-server installation on lava-master-02, the default
shell was changed by setting `lava_test_sh_cmd` in the base device
type template file
`/etc/lava-server/dispatcher-config/device-types/base.jinja2`.

Rather than setting the value for all devices by default in global
configuration, I think it is best to make the expected shell explicit
in our submitted job configuration. The SHELL environment variable is
read and used by the `lava_dispatcher/lava_test_shell/lava-test-shell`
script to set the interpreter for the tests.

Note: It doesn't seem possible to update the SHELL or
`lava_test_sh_cmd` on a per-test basis.

Change-Id: I7a02f1e76cfc50dfea7925d27609533e831bd221

scripts/system-tests/template_lava_job.jinja2

index 59fc91f0da701270926a53c3ae39c6227c8fb129..5aaece84c9fc07eae4617f2e2cee6029a4504170 100644 (file)
@@ -16,6 +16,9 @@ context:
   extra_kernel_args: cpuidle.off=1
   extra_nfsroot_args: ",nfsvers=3 nfsrootdebug"
 
+environment:
+  SHELL: "/bin/bash"
+
 {% if device_type == DeviceType.kvm %}
 tags:
   - qemu
This page took 0.032144 seconds and 4 git commands to generate.