oeqa runtime clamav.py: use curl if ping fails

TEST_RUNQEMUPARAMS = "slirp" does not pass ping through
but UDP and TCP will work. Thus curl the http website
even if the response is DoS blocker and not the real
website.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Mikko Rapeli
2024-12-20 16:04:28 +02:00
committed by Armin Kuster
parent 5c98ff10a6
commit 1851ec38b7

View File

@@ -44,7 +44,7 @@ class ClamavTest(OERuntimeTestCase):
msg = 'File could not be copied. Output: %s' % output
self.assertEqual(status, 0, msg=msg)
status, output = self.target.run('ping -c 1 database.clamav.net')
status, output = self.target.run('ping -c 1 database.clamav.net || curl http://database.clamav.net')
msg = ('ping database.clamav.net failed: output is:\n%s' % output)
self.assertEqual(status, 0, msg = msg)