From patchwork Tue Nov 12 16:23:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Niestroj X-Patchwork-Id: 1193679 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=grinn-global.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47CCkw6p7Lz9sPT for ; Wed, 13 Nov 2019 03:24:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A1FAE203B5; Tue, 12 Nov 2019 16:24:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NGveoDGIgBIh; Tue, 12 Nov 2019 16:24:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 789F02010E; Tue, 12 Nov 2019 16:24:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9C0651BF479 for ; Tue, 12 Nov 2019 16:24:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9958E854C2 for ; Tue, 12 Nov 2019 16:24:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 591wklr3VkEY for ; Tue, 12 Nov 2019 16:24:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.megiteam.pl (smtp.megiteam.pl [31.186.83.105]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BA13D85495 for ; Tue, 12 Nov 2019 16:24:13 +0000 (UTC) Received: from [95.143.241.142] (helo=localhost.localdomain) by smtp.megiteam.pl with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86.2_XX) (envelope-from ) id 1iUYxe-0004dT-69; Tue, 12 Nov 2019 17:24:10 +0100 From: Marcin Niestroj To: buildroot@buildroot.org Date: Tue, 12 Nov 2019 17:23:25 +0100 Message-Id: <20191112162325.529637-2-m.niestroj@grinn-global.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191112162325.529637-1-m.niestroj@grinn-global.com> References: <20191112162325.529637-1-m.niestroj@grinn-global.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH next v3 2/2] support/testing: add netdata test X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcin Niestroj , Matthew Weber Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Marcin Niestroj Tested-by: Matt Weber --- changes v2 -> v3: none changes v1 -> v2: - squash DEVELOPERS entry from another commit (suggested by Arnout) .gitlab-ci.yml | 1 + DEVELOPERS | 1 + support/testing/tests/package/test_netdata.py | 35 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 support/testing/tests/package/test_netdata.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..2e164d8800 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -411,6 +411,7 @@ tests.package.test_luasyslog.TestLuaLuasyslog: { extends: .runtime_test } tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test } tests.package.test_luvi.TestLuvi: { extends: .runtime_test } tests.package.test_lzlib.TestLuaLzlib: { extends: .runtime_test } +tests.package.test_netdata.TestNetdata: { extends: .runtime_test } tests.package.test_openjdk.TestOpenJdk: { extends: .runtime_test } tests.package.test_perl.TestPerl: { extends: .runtime_test } tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test } diff --git a/DEVELOPERS b/DEVELOPERS index 69ea49339d..59ba8f865b 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1464,6 +1464,7 @@ F: package/murata-cyw-fw/ F: package/netdata/ F: package/rs485conf/ F: package/turbolua/ +F: support/testing/tests/package/test_netdata.py N: Marcus Folkesson F: package/libostree/ diff --git a/support/testing/tests/package/test_netdata.py b/support/testing/tests/package/test_netdata.py new file mode 100644 index 0000000000..b5437ba3fe --- /dev/null +++ b/support/testing/tests/package/test_netdata.py @@ -0,0 +1,35 @@ +import os + +import infra.basetest + + +class TestNetdata(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_NETDATA=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() + + cmd = "mkdir -p /var/cache/netdata" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "netdata -u root -p 80" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "sleep 1" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + + cmd = "wget localhost -O - | grep 'netdata dashboard'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0)