diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-09 11:13:11 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-09 23:26:15 +0100 |
commit | 141172a810956eab7a897bd34b76a26cf1384495 (patch) | |
tree | 3fa2af82b87f3256791302bc8bcdd0a40b969f76 /scripts | |
parent | eeb90e20d999b396928364231ecb8615ef20e2b2 (diff) | |
download | vyos-build-141172a810956eab7a897bd34b76a26cf1384495.tar.gz vyos-build-141172a810956eab7a897bd34b76a26cf1384495.zip |
Testsuite: set default timeout to 60 seconds
(cherry picked from commit 76f59a39153f4e5880602f4b439efabb2dff3b07)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-qemu-install | 23 |
1 files changed, 10 insertions, 13 deletions
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 |