[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/18] tests/acceptance/virtiofs_submounts: use workdir property
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 12/18] tests/acceptance/virtiofs_submounts: use workdir property |
Date: |
Mon, 8 Feb 2021 14:37:05 +0100 |
From: Cleber Rosa <crosa@redhat.com>
For Avocado Instrumented based tests, it's a better idea to just use
the property. The environment variable is a fall back for tests not
written using that Python API.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reference:
https://avocado-framework.readthedocs.io/en/84.0/api/test/avocado.html#avocado.Test.workdir
Message-Id: <20210203172357.1422425-5-crosa@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
tests/acceptance/virtiofs_submounts.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tests/acceptance/virtiofs_submounts.py
b/tests/acceptance/virtiofs_submounts.py
index 361e5990b65..68d3cd68696 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -136,8 +136,7 @@ def run(self, args, ignore_error=False):
return (stdout, stderr, ret)
def set_up_shared_dir(self):
- atwd = os.getenv('AVOCADO_TEST_WORKDIR')
- self.shared_dir = os.path.join(atwd, 'virtiofs-shared')
+ self.shared_dir = os.path.join(self.workdir, 'virtiofs-shared')
os.mkdir(self.shared_dir)
@@ -234,8 +233,7 @@ def setUp(self):
self.seed = self.params.get('seed')
- atwd = os.getenv('AVOCADO_TEST_WORKDIR')
- self.ssh_key = os.path.join(atwd, 'id_ed25519')
+ self.ssh_key = os.path.join(self.workdir, 'id_ed25519')
self.run(('ssh-keygen', '-t', 'ed25519', '-f', self.ssh_key))
--
2.26.2
- [PULL 00/18] Integration testing patches for 2021-02-08, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 02/18] tests/acceptance: Introduce tesseract_ocr() helper, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 01/18] tests/acceptance: Extract tesseract_available() helper in new namespace, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 03/18] tests/acceptance: Extract do_test_arm_orangepi_armbian_uboot() method, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 07/18] tests/acceptance: Add a test for the virtex-ml507 ppc machine, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 05/18] tests/acceptance: Move the pseries test to a separate file, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 06/18] tests/acceptance: Test the mpc8544ds machine, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 11/18] tests/acceptance/boot_linux: rename misleading cloudinit method, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 12/18] tests/acceptance/virtiofs_submounts: use workdir property,
Philippe Mathieu-Daudé <=
- [PULL 14/18] tests/acceptance/virtiofs_submounts: use a virtio-net device instead, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 15/18] tests/acceptance/virtiofs_submounts: standardize port as integer, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 04/18] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 09/18] tests/acceptance: Re-enable the microblaze test, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 13/18] tests/acceptance/virtiofs_submounts: do not ask for ssh key password, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 16/18] tests/acceptance/virtiofs_submounts: required space between IP and port, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 10/18] tests/acceptance/boot_linux: fix typo on cloudinit error message, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 18/18] Acceptance Tests: remove unnecessary tag from documentation example, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 08/18] tests/acceptance: Increase the timeout in the replay tests, Philippe Mathieu-Daudé, 2021/02/08
- [PULL 17/18] Acceptance tests: clarify ssh connection failure reason, Philippe Mathieu-Daudé, 2021/02/08