mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/testing: new rt-tests runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
99423ee495
commit
3ebc7c69d5
@@ -1893,6 +1893,7 @@ F: support/testing/tests/package/test_python_spake2.py
|
||||
F: support/testing/tests/package/test_python_sympy.py
|
||||
F: support/testing/tests/package/test_rdma_core.py
|
||||
F: support/testing/tests/package/test_rdma_core/
|
||||
F: support/testing/tests/package/test_rt_tests.py
|
||||
F: support/testing/tests/package/test_screen.py
|
||||
F: support/testing/tests/package/test_sed.py
|
||||
F: support/testing/tests/package/test_socat.py
|
||||
|
||||
39
support/testing/tests/package/test_rt_tests.py
Normal file
39
support/testing/tests/package/test_rt_tests.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import os
|
||||
|
||||
import infra.basetest
|
||||
|
||||
|
||||
class TestRtTests(infra.basetest.BRTest):
|
||||
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
|
||||
"""
|
||||
BR2_PACKAGE_RT_TESTS=y
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
"""
|
||||
|
||||
def test_run(self):
|
||||
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
|
||||
self.emulator.boot(arch="armv5",
|
||||
kernel="builtin",
|
||||
options=["-initrd", cpio_file])
|
||||
self.emulator.login()
|
||||
|
||||
# We cannot easily test realtime properties in a CI/emulator
|
||||
# environment. Instead, this test runs few rt-tests programs
|
||||
# in small scenario configurations (to make sure the execution
|
||||
# will remain short). It just makes sure the execution returns
|
||||
# a success code. Also, to avoid making the logs too big, we
|
||||
# generally pass the "--quiet" option to have a summary at the
|
||||
# end of the execution.
|
||||
test_cmds = [
|
||||
"cyclictest --quiet --loops=200",
|
||||
"hackbench --fds=2 --groups=3 --loops=5",
|
||||
"pi_stress --inversions=100",
|
||||
"ptsematest --quiet --loops=100",
|
||||
"rt-migrate-test --quiet --loops=5",
|
||||
"signaltest --quiet --loops=200",
|
||||
"sigwaittest --quiet --loops=100"
|
||||
]
|
||||
|
||||
for cmd in test_cmds:
|
||||
self.assertRunOk(cmd)
|
||||
Reference in New Issue
Block a user