From patchwork Tue Jun 2 10:40:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1302332 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.137; helo=fraxinus.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=tEK0zVaE; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49bpV654Fdz9sSg for ; Tue, 2 Jun 2020 20:40:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5DB9D863D9; Tue, 2 Jun 2020 10:40:43 +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 DHDz7BsR1aQ8; Tue, 2 Jun 2020 10:40:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5610985BC2; Tue, 2 Jun 2020 10:40:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 8C5CD1BF27A for ; Tue, 2 Jun 2020 10:40:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 82A862078B for ; Tue, 2 Jun 2020 10:40:38 +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 Maf5fH4Y-eKf for ; Tue, 2 Jun 2020 10:40:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by silver.osuosl.org (Postfix) with ESMTPS id 3D15A20110 for ; Tue, 2 Jun 2020 10:40:37 +0000 (UTC) Received: by mail-wr1-f45.google.com with SMTP id y17so2834902wrn.11 for ; Tue, 02 Jun 2020 03:40:37 -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=lOClLLSsJtnlFCaHXy4sZblBysudIShUIimPeZzyeEk=; b=tEK0zVaEsl9j54YbXpobE21CW5drnY4Gzjgdc40Crgig3HRSmI4Y+9JIN1LS+1Vq3x fnHvtNhG0ZG/0sfuIVv137IMtLEp97fiNiJGT2vk7+7PRoUCGfvvG1w0aN/Voj78Nojx 2jetra2YMura2jg9LUPUXl/LKRdAcph8d4e2GY6xnGyiMHJBTitaBz4v41l5HvkbxCIk W2MxS9Dejp6c0gwmPufNx+65ubXCX7CscGqly6hYNWSasR1pgaGnhJUYv0hYG4r24lJz G4RPKtTUdkqaE/L0QEbkM/ysTJSz7Si0n0M3RMYq1YzgBMCZ5liyh3X4EfTTYMkqQi/c 3EGg== 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=lOClLLSsJtnlFCaHXy4sZblBysudIShUIimPeZzyeEk=; b=leueJt9Xjy03QU/DqyqF3HFrGC9UswM++QmB3wuUo/c8wb5xSvfNyjwkqY/yK6Rark 7VjjugmdAnS7Jl1aaCb3t0MkkvjyswoWyQc0X2kuIoyHbNkYCk9bBhYREAl5bQKh73pM GvrTwAwdeEXxqv8i5ArrQcObXGc1IQpI9q+2znA8OzPPpXBnVBprAg/N7ZzX0ymLc3WI kKEIPTbsw9mixZLpGs+XoqI3kDU/eyS6yKrvNlPQhVCxtYXac6e5mTtl7QUznIopUCC4 2aOo8ZlNWWSm4/0/kvILO8cue4RTfazm9oXjAZgCe80pQfkqHEl5x7uey6f4uDj+AGnv 8XYw== X-Gm-Message-State: AOAM532J9XFdhbwazsxY6/ET/CxXKb8tS9q7fRPh9dwXchaYFkGp/Wg7 p8zwecPALO0nN418AZakPGQThe5MqbzXMg== X-Google-Smtp-Source: ABdhPJwgdrcfLsQtDgNN8UTtkV+kUJG7sr498WiNfBNqTRV7CGq4h2knrNYZfzB1abeKpmqnfTYKMg== X-Received: by 2002:adf:c6c5:: with SMTP id c5mr16877479wrh.13.1591094435226; Tue, 02 Jun 2020 03:40:35 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:63d3:7700:5fb9:2a66:a7a8:378f]) by smtp.gmail.com with ESMTPSA id g3sm3627738wrb.46.2020.06.02.03.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 03:40:34 -0700 (PDT) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 2 Jun 2020 12:40:09 +0200 Message-Id: <20200602104011.837-3-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200602104011.837-1-titouan.christophe@railnova.eu> References: <20200602104011.837-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 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 efb97c739c..ae46331c63 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2521,6 +2521,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"')