aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/fedora
diff options
context:
space:
mode:
authorRobert Foley <robert.foley@linaro.org>2020-07-01 14:56:23 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-07-11 15:52:59 +0100
commitdf00168039c8a58db3c33456db2c00da51043ee2 (patch)
tree103b1c033a813803292df0b35d929b3800960033 /tests/vm/fedora
parentd322fe2daf1bd3572b7917f6beafbc1cfbfe50fe (diff)
downloadqemu-df00168039c8a58db3c33456db2c00da51043ee2.zip
qemu-df00168039c8a58db3c33456db2c00da51043ee2.tar.gz
qemu-df00168039c8a58db3c33456db2c00da51043ee2.tar.bz2
tests/vm: change scripts to use self._config
This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200601211421.1277-8-robert.foley@linaro.org> Message-Id: <20200701135652.1366-12-alex.bennee@linaro.org>
Diffstat (limited to 'tests/vm/fedora')
-rwxr-xr-xtests/vm/fedora17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/vm/fedora b/tests/vm/fedora
index a919567..b2b478f 100755
--- a/tests/vm/fedora
+++ b/tests/vm/fedora
@@ -108,20 +108,20 @@ class FedoraVM(basevm.BaseVM):
self.console_wait_send("7) [!] Root password", "7\n")
self.console_wait("Password:")
- self.console_send("%s\n" % self.ROOT_PASS)
+ self.console_send("%s\n" % self._config["root_pass"])
self.console_wait("Password (confirm):")
- self.console_send("%s\n" % self.ROOT_PASS)
+ self.console_send("%s\n" % self._config["root_pass"])
self.console_wait_send("8) [ ] User creation", "8\n")
self.console_wait_send("1) [ ] Create user", "1\n")
self.console_wait_send("3) User name", "3\n")
- self.console_wait_send("ENTER:", "%s\n" % self.GUEST_USER)
+ self.console_wait_send("ENTER:", "%s\n" % self._config["guest_user"])
self.console_wait_send("4) [ ] Use password", "4\n")
self.console_wait_send("5) Password", "5\n")
self.console_wait("Password:")
- self.console_send("%s\n" % self.GUEST_PASS)
+ self.console_send("%s\n" % self._config["guest_pass"])
self.console_wait("Password (confirm):")
- self.console_send("%s\n" % self.GUEST_PASS)
+ self.console_send("%s\n" % self._config["guest_pass"])
self.console_wait_send("7) Groups", "c\n")
while True:
@@ -139,7 +139,7 @@ class FedoraVM(basevm.BaseVM):
if good:
break
time.sleep(10)
- self.console_send("r\n" % self.GUEST_PASS)
+ self.console_send("r\n" % self._config["guest_pass"])
self.console_wait_send("'b' to begin install", "b\n")
@@ -150,12 +150,13 @@ class FedoraVM(basevm.BaseVM):
# setup qemu user
prompt = " ~]$"
- self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS)
+ self.console_ssh_init(prompt, self._config["guest_user"],
+ self._config["guest_pass"])
self.console_wait_send(prompt, "exit\n")
# setup root user
prompt = " ~]#"
- self.console_ssh_init(prompt, "root", self.ROOT_PASS)
+ self.console_ssh_init(prompt, "root", self._config["root_pass"])
self.console_sshd_config(prompt)
# setup virtio-blk #1 (tarfile)