Testsuite: check for smoketest error

This commit is contained in:
Christian Poessinger 2020-02-04 20:12:49 +01:00
parent a3afff0a41
commit baa7ab9fa1

View File

@ -293,6 +293,7 @@ try:
i = child.expect(['\n +Invalid command:',
'\n +Set failed',
'No such file or directory',
'SMOKETEST FAILED!',
r'\n\S+@\S+[$#]'], timeout=1800)
if i==0:
@ -302,7 +303,10 @@ try:
elif i==2:
log.error("Did not find VyOS smoketest, this should be an exception")
raise Exception("WTF? did not find VyOS smoketest, this should be an exception")
cr(c, '/usr/bin/vyos-smoketest')
elif i==3:
log.error("Smoketest failed with an non-zero exitcode")
cr(c, '/usr/bin/vyos-smoketest || echo "SMOKETEST FAILED!"')
log.info("Smoke test status")
#data = c.before.decode()