support/testing: add coremark test
Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
b89435db60
commit
c47da268be
@ -1763,6 +1763,7 @@ F: support/testing/tests/package/test_bc.py
|
|||||||
F: support/testing/tests/package/test_brotli.py
|
F: support/testing/tests/package/test_brotli.py
|
||||||
F: support/testing/tests/package/test_bzip2.py
|
F: support/testing/tests/package/test_bzip2.py
|
||||||
F: support/testing/tests/package/test_compressor_base.py
|
F: support/testing/tests/package/test_compressor_base.py
|
||||||
|
F: support/testing/tests/package/test_coremark.py
|
||||||
F: support/testing/tests/package/test_ddrescue.py
|
F: support/testing/tests/package/test_ddrescue.py
|
||||||
F: support/testing/tests/package/test_ddrescue/
|
F: support/testing/tests/package/test_ddrescue/
|
||||||
F: support/testing/tests/package/test_dos2unix.py
|
F: support/testing/tests/package/test_dos2unix.py
|
||||||
|
33
support/testing/tests/package/test_coremark.py
Normal file
33
support/testing/tests/package/test_coremark.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import infra.basetest
|
||||||
|
|
||||||
|
|
||||||
|
class TestCoreMark(infra.basetest.BRTest):
|
||||||
|
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
|
||||||
|
"""
|
||||||
|
BR2_PACKAGE_COREMARK=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()
|
||||||
|
|
||||||
|
log_file = "run1.log"
|
||||||
|
|
||||||
|
# Run a CoreMark benchmark.
|
||||||
|
self.assertRunOk(f"coremark > {log_file}", timeout=60)
|
||||||
|
|
||||||
|
# Print the log file on console, for debugging.
|
||||||
|
self.assertRunOk(f"cat {log_file}")
|
||||||
|
|
||||||
|
# The "coremark" program return code is always 0 (success).
|
||||||
|
# So the correct execution is validated from the run log.
|
||||||
|
valid_msg = "Correct operation validated."
|
||||||
|
cmd = f"grep -F '{valid_msg}' {log_file}"
|
||||||
|
self.assertRunOk(cmd)
|
Loading…
Reference in New Issue
Block a user