From patchwork Sat May 9 16:50:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1286741 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=z3aCJF3F; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KCrd2H03z9sSc for ; Sun, 10 May 2020 02:51:12 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4C2FE88778; Sat, 9 May 2020 16:51:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gv-j2dcskksb; Sat, 9 May 2020 16:51:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AD0AA8878B; Sat, 9 May 2020 16:51:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D2D931BF94D for ; Sat, 9 May 2020 16:50:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C90288878B for ; Sat, 9 May 2020 16:50:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DKegJeEcq4qy for ; Sat, 9 May 2020 16:50:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id CC8C188778 for ; Sat, 9 May 2020 16:50:54 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id k1so5595020wrx.4 for ; Sat, 09 May 2020 09:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=udD6Z0Vby5t2gU+9sn2iTADCqi+GOww7BV6ZlgdNhkg=; b=z3aCJF3F7kvhlbjZWRD4aYYtkGqcX3V856xgum/B7E0B1/DC9AloJ9ahkzOWXKkhO5 mxq1zYts7vL5Fvv5PIBqGRKTqJTGVifffHAEh0udkQaDOm/L7tW9TUQvN/COBbw+oqVw mO1/r8Sc97GCiEC1u8TsYzEYkMeAfsU61F5pSqRqkR99RvthbiZ1xFpPGn8JVPWz27G+ PNnjpLtIFuDcTzOgqE2mEJ+gY7J4qZXUa7uaKQHeXeIsjW+77pP22ZrcdepOtVYFanBe SAbs1b7+GGyzM+WsyZFtHuJRmqlhAgX2xZI4hd7kVC7GLyKNgXh34aDv5GDKEhqn61i5 sjIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=udD6Z0Vby5t2gU+9sn2iTADCqi+GOww7BV6ZlgdNhkg=; b=Arzwc4oV9j2+BxvRh4v9Pay/3Z+K2b9MlEvXTPCWjqb4qvwxk4eSutySv0H1RbAMGc G6FEqoA4j4+es02m/LTkxp7dS8L3W/xL+8g+FPsHskEG9R5p4BSnz1qMKxkgtiRwgERd zvBP+PlFg1qE/knKOADbIiwWQ49GQDaAltykBF/GPslC873XmYBgjVIUr94SXTMXse1G zoMSBfIonzFA+xGTiRFpWnIeIRJKT6mJddC3fOqx/RMXH8pBm00iIUtuwiPJzvS99BK7 GYgaQl967nkDiPzVgQxEs90HyGDcUol0uqZcDyouBhyLNObBOW9kyg0mioUaFUpxM2NX KJvQ== X-Gm-Message-State: AGi0Puau/WFQCDTbT2lSkcnLQ2RGZDiKx10comfkwxYYOgC7vzgIc62h +9Pt8YAhe6J8sD0IzfbdK+MNqr3fnhM9og== X-Google-Smtp-Source: APiQypIA2JOe0cdj7yxvPs/0tLzB6WYlUzHYV4T9WFeRNYIRDPDpgehU4oEmcFXYKN+TIpGjgc4YrQ== X-Received: by 2002:adf:de81:: with SMTP id w1mr8972109wrl.353.1589043053068; Sat, 09 May 2020 09:50:53 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:63d3:7700:cd2f:ad0c:9163:73be]) by smtp.gmail.com with ESMTPSA id u127sm18577787wme.8.2020.05.09.09.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 09:50:52 -0700 (PDT) From: Titouan Christophe To: buildroot@buildroot.org Date: Sat, 9 May 2020 18:50:37 +0200 Message-Id: <20200509165039.10363-3-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200509165039.10363-1-titouan.christophe@railnova.eu> References: <20200509165039.10363-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/4] support/testing: add runtime test for Redis 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: Daniel Price , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Titouan Christophe --- .gitlab-ci.yml | 1 + DEVELOPERS | 1 + support/testing/tests/package/test_redis.py | 24 +++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 support/testing/tests/package/test_redis.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa8e077a07..a3800d4ba1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -513,6 +513,7 @@ tests.package.test_python_txtorcon.TestPythonPy2Txtorcon: { extends: .runtime_te tests.package.test_python_txtorcon.TestPythonPy3Txtorcon: { extends: .runtime_test } tests.package.test_python_ubjson.TestPythonPy2Ubjson: { extends: .runtime_test } tests.package.test_python_ubjson.TestPythonPy3Ubjson: { extends: .runtime_test } +tests.package.test_redis.TestRedis: { extends: .runtime_test } tests.package.test_rings.TestLuaRings: { extends: .runtime_test } tests.package.test_rings.TestLuajitRings: { extends: .runtime_test } tests.package.test_rust.TestRust: { extends: .runtime_test } diff --git a/DEVELOPERS b/DEVELOPERS index e427ab15d4..9bb23dd970 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2559,6 +2559,7 @@ F: package/python-avro/ F: package/redis/ F: package/waf/ F: support/testing/tests/package/test_crudini.py +F: support/testing/tests/package/test_redis.py N: Trent Piepho F: package/libp11/ diff --git a/support/testing/tests/package/test_redis.py b/support/testing/tests/package/test_redis.py new file mode 100644 index 0000000000..d79998514e --- /dev/null +++ b/support/testing/tests/package/test_redis.py @@ -0,0 +1,24 @@ +import os + +import infra.basetest + + +class TestRedis(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + """ + BR2_TARGET_ROOTFS_CPIO=y + BR2_PACKAGE_REDIS=y + """ + + 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() + + _, exit_code = self.emulator.run("redis-cli SET hello world") + self.assertEqual(exit_code, 0) + + output, exit_code = self.emulator.run("redis-cli GET hello") + self.assertEqual(exit_code, 0) + self.assertEqual(output[0].strip(), '"world"')