diff options
author | guillaume.lambert <guillaume.lambert@orange.com> | 2022-05-10 22:04:23 +0200 |
---|---|---|
committer | Guillaume Lambert <guillaume.lambert@orange.com> | 2023-03-21 09:13:19 +0000 |
commit | b9fedb6868306a6e3145b7ee851ea3a84353df9c (patch) | |
tree | 0deebe33f61c377970a0c38b7679537523bca172 /functest/opnfv_tests | |
parent | 7677c43363c22c7bfca60855058af503860c63b8 (diff) |
Stop bashing functest scripts
Though bash is a good interactive user shell
and apart portability concerns,
many UN*X systems and GNU+Linux distributions now prefers Almquist
or Kornshell variants for scripting in order to improve the system
performance and maintenability.
https://wiki.ubuntu.com/DashAsBinSh
https://mywiki.wooledge.org/Bashism
https://en.wikipedia.org/wiki/Almquist_shell
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I32c5490f9eab54e6cac594f3eac1e392edf8b272
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_userdata.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/clearwater.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py index 7de70f677..8a8f26f37 100644 --- a/functest/opnfv_tests/openstack/vping/vping_userdata.py +++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py @@ -104,7 +104,7 @@ class VPingUserdata(singlevm.VmReady2): """ Returns the post VM creation script to be added into the VM's userdata :param test_ip: the IP value to substitute into the script - :return: the bash script contents + :return: the shell script contents """ ip4 = self.vm1.private_v4 or self.vm1.addresses[ self.network.name][0].addr diff --git a/functest/opnfv_tests/vnf/ims/clearwater.py b/functest/opnfv_tests/vnf/ims/clearwater.py index bbd5291eb..4c143fd70 100644 --- a/functest/opnfv_tests/vnf/ims/clearwater.py +++ b/functest/opnfv_tests/vnf/ims/clearwater.py @@ -155,7 +155,7 @@ class ClearwaterTesting(): subscript = f' PROXY={self.bono_ip} ELLIS={self.ellis_ip}' script = f'{script}{subscript}' script = f'{script} --trace' - cmd = f"/bin/bash -c '{script}'" + cmd = f"/bin/sh -c '{script}'" self.logger.debug('Live test cmd: %s', cmd) output_file = os.path.join(self.result_dir, "ims_test_output.txt") ft_utils.execute_command(cmd, |