2019-01-28 03:14:06 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
import infra.basetest
|
|
|
|
|
2019-08-03 07:22:16 +02:00
|
|
|
BASIC_TOOLCHAIN_CONFIG_HEADERS_AT_LEAST_3_14 = \
|
|
|
|
"""
|
|
|
|
BR2_arm=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2"
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
|
|
|
|
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
|
|
|
|
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
|
|
|
"""
|
|
|
|
|
2019-01-28 03:14:06 +01:00
|
|
|
|
|
|
|
class TestAtop(infra.basetest.BRTest):
|
2019-08-03 07:22:16 +02:00
|
|
|
config = BASIC_TOOLCHAIN_CONFIG_HEADERS_AT_LEAST_3_14 + \
|
2019-01-28 03:14:06 +01:00
|
|
|
"""
|
|
|
|
BR2_PACKAGE_ATOP=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")
|
2019-08-03 07:22:16 +02:00
|
|
|
self.emulator.boot(arch="armv5",
|
|
|
|
kernel="builtin",
|
|
|
|
options=["-initrd", cpio_file])
|
2019-01-28 03:14:06 +01:00
|
|
|
self.emulator.login()
|
|
|
|
|
|
|
|
cmd = "atop -V | grep '^Version'"
|
2021-06-26 15:32:38 +02:00
|
|
|
self.assertRunOk(cmd)
|
2019-01-28 03:14:06 +01:00
|
|
|
|
|
|
|
cmd = "atop -a 1 2 | grep '% *atop *$'"
|
2021-06-26 15:32:38 +02:00
|
|
|
self.assertRunOk(cmd)
|