summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorRicardo Martincoski <ricardo.martincoski@gmail.com>2019-01-28 00:14:06 -0200
committerPeter Korsgaard <peter@korsgaard.com>2019-01-28 10:00:45 +0100
commite2b98dfede5f0e2a525853fcddade263af4a0202 (patch)
treedd444beec6b8882ef5a72c69bd6bbf0a118b5294 /support
parent780ea788b60d1b0dcdc85e562a12178182d046a9 (diff)
downloadbuildroot-e2b98dfede5f0e2a525853fcddade263af4a0202.tar.gz
buildroot-e2b98dfede5f0e2a525853fcddade263af4a0202.zip
support/testing: add atop test
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support')
-rw-r--r--support/testing/tests/package/test_atop.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/support/testing/tests/package/test_atop.py b/support/testing/tests/package/test_atop.py
new file mode 100644
index 0000000000..32c5a07c3c
--- /dev/null
+++ b/support/testing/tests/package/test_atop.py
@@ -0,0 +1,40 @@
+import os
+
+import infra.basetest
+
+
+class TestAtop(infra.basetest.BRTest):
+ config = \
+ """
+ BR2_arm=y
+ BR2_cortex_a9=y
+ BR2_ARM_ENABLE_NEON=y
+ BR2_ARM_ENABLE_VFP=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+ BR2_SYSTEM_DHCP="eth0"
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7"
+ BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
+ BR2_LINUX_KERNEL_DTS_SUPPORT=y
+ BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9"
+ BR2_PACKAGE_ATOP=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def test_run(self):
+ kernel = os.path.join(self.builddir, "images", "zImage")
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ dtb = os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb")
+ self.emulator.boot(arch="armv7", kernel=kernel, options=["-initrd", cpio_file, "-M", "vexpress-a9", "-dtb", dtb])
+ self.emulator.login()
+
+ cmd = "atop -V | grep '^Version'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
+
+ cmd = "atop -a 1 2 | grep '% *atop *$'"
+ _, exit_code = self.emulator.run(cmd)
+ self.assertEqual(exit_code, 0)
OpenPOWER on IntegriCloud