1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

oeqa runtime: add optee.py test

The test runs xtest test suite from optee-tests package.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Mikko Rapeli
2024-04-30 15:37:29 +03:00
committed by Jon Mason
parent 1dad884ac0
commit d450786667

View File

@@ -0,0 +1,24 @@
#
# SPDX-License-Identifier: MIT
#
import os
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.runtime.decorator.package import OEHasPackage
from oeqa.core.decorator.oetimeout import OETimeout
class OpteeTestSuite(OERuntimeTestCase):
"""
Run OP-TEE tests (xtest).
"""
@OETimeout(800)
@OEHasPackage(['optee-test'])
def test_opteetest_xtest(self):
# clear storage before executing tests
cmd = "xtest --clear-storage || true"
status, output = self.target.run(cmd, timeout=60)
self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
cmd = "xtest"
status, output = self.target.run(cmd, timeout=600)
self.assertEqual(status, 0, msg='\n'.join([cmd, output]))