From 141172a810956eab7a897bd34b76a26cf1384495 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 9 Dec 2021 11:13:11 +0100 Subject: Testsuite: set default timeout to 60 seconds (cherry picked from commit 76f59a39153f4e5880602f4b439efabb2dff3b07) --- scripts/check-qemu-install | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 94c08a4b..e1d956f5 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -217,7 +217,7 @@ try: log.info('Installing system') cmd = get_qemu_cmd('TESTVM', kvm, args.uefi, args.disk, diskname_raid, args.iso) log.debug(f'Executing command: {cmd}') - c = pexpect.spawn(cmd, logfile=stl) + c = pexpect.spawn(cmd, logfile=stl, timeout=60) ################################################# # Logging into VyOS system @@ -235,10 +235,10 @@ try: log.info('Waiting for login prompt') c.expect('[Ll]ogin:', timeout=300) - c.sendline('vyos') - c.expect('[Pp]assword:', timeout=10) - c.sendline('vyos') - c.expect(r'vyos@vyos:~\$') + c.sendline(default_user) + c.expect('[Pp]assword:') + c.sendline(default_password) + c.expect(op_mode_prompt) log.info('Logged in!') ################################################# @@ -267,10 +267,10 @@ try: c.sendline('') log.info('Disk(s) partitioned, installing...') - c.expect('\nWhat would you like to name this image?.*:', timeout=300) + c.expect('\nWhat would you like to name this image?.*:', timeout=600) c.sendline('') log.info('Copying files') - c.expect('\nWhich one should I copy to.*:', timeout=300) + c.expect('\nWhich one should I copy to.*:', timeout=600) c.sendline('') log.info('Files Copied!') c.expect('\nEnter password for user.*:') @@ -322,14 +322,11 @@ try: log.info('Waiting for login prompt') c.expect('[Ll]ogin:', timeout=600) c.sendline(default_user) - c.expect('[Pp]assword:', timeout=20) + c.expect('[Pp]assword:') c.sendline(default_password) c.expect(op_mode_prompt) log.info('Logged in!') - # additional settling time - time.sleep(20) - ################################################ # Always load the WiFi simulation module ################################################ @@ -383,7 +380,7 @@ try: raise Exception(tmp) c.sendline('echo EXITCODE:$\x16?') - i = c.expect(['EXITCODE:0', 'EXITCODE:\d+'], timeout=20) + i = c.expect(['EXITCODE:0', 'EXITCODE:\d+']) if i == 0: log.info('Smoketest finished successfully!') pass @@ -440,7 +437,7 @@ try: raise Exception(tmp) c.sendline('echo EXITCODE:$\x16?') - i = c.expect(['EXITCODE:0', 'EXITCODE:\d+'], timeout=10) + i = c.expect(['EXITCODE:0', 'EXITCODE:\d+']) if i == 0: log.info('Configtest finished successfully!') pass -- cgit v1.2.3