From patchwork Thu Mar 12 16:00:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Niestroj X-Patchwork-Id: 1253693 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 48dYTk2BF8z9sPF for ; Fri, 13 Mar 2020 03:01:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 804742012F; Thu, 12 Mar 2020 16:01:11 +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 I4TZGV1X5H7b; Thu, 12 Mar 2020 16:01:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1F47220357; Thu, 12 Mar 2020 16:01:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 403851BF40B for ; Thu, 12 Mar 2020 16:01:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3507188624 for ; Thu, 12 Mar 2020 16:01:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsQ5vNbWGgKM for ; Thu, 12 Mar 2020 16:01:06 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 0D53A88430 for ; Thu, 12 Mar 2020 16:01:05 +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 1jCQGb-0000Td-GH; Thu, 12 Mar 2020 17:01:02 +0100 From: Marcin Niestroj To: buildroot@buildroot.org Date: Thu, 12 Mar 2020 17:00:40 +0100 Message-Id: <20200312160040.3416161-2-m.niestroj@grinn-global.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200312160040.3416161-1-m.niestroj@grinn-global.com> References: <20200312160040.3416161-1-m.niestroj@grinn-global.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v5 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Marcin Niestroj --- changes v4 -> v5: none changes v3 -> v4: - do not launch netdata explicitly, but rely on init script to run netdata on default port 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 | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 support/testing/tests/package/test_netdata.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abd9dab250..d662cda520 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -421,6 +421,7 @@ tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test } tests.package.test_luvi.TestLuvi: { extends: .runtime_test } tests.package.test_lxc.TestLxc: { 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_opkg.TestOpkg: { extends: .runtime_test } tests.package.test_perl.TestPerl: { extends: .runtime_test } diff --git a/DEVELOPERS b/DEVELOPERS index 3252d02e93..888ef7e4d2 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1553,6 +1553,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..7418b762a4 --- /dev/null +++ b/support/testing/tests/package/test_netdata.py @@ -0,0 +1,23 @@ +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 = "wget localhost:19999 -O - | grep 'netdata dashboard'" + _, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0)