From patchwork Tue Jun 14 16:47:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1643361 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ePtzmpW5; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LMvWg3yqDz9tl5 for ; Wed, 15 Jun 2022 02:48:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9AD4E40B65; Tue, 14 Jun 2022 16:48:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TY2AUNWPtFGA; Tue, 14 Jun 2022 16:48:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id B513240B73; Tue, 14 Jun 2022 16:48:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 153DE1BF37A for ; Tue, 14 Jun 2022 16:48:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 132D8415D5 for ; Tue, 14 Jun 2022 16:48:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=mind.be Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fHZXkVVeo4ZT for ; Tue, 14 Jun 2022 16:48:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8B881410BB for ; Tue, 14 Jun 2022 16:48:07 +0000 (UTC) Received: by mail-ed1-x532.google.com with SMTP id b8so12445732edj.11 for ; Tue, 14 Jun 2022 09:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dS6Az5GdZwzc+HVwAElEaOUa+iqST3lgg/xrmF2h4pU=; b=ePtzmpW5T1vl0u9OHKrz4uQmsRqExJL4jdeZNE2cPKM/q5LP4b5Sliy6PP8i4d/KSm xXL4Qqpe4vbFrHDllASN95GNk3TYt+UgBYwx3ddtWszZdNp2WG7kt8V6c4mPjvkXMbm5 OroGlLvvprGPAkRH8luxFi6+1Jqx8es8AYwZ68G80OEsZnpGTdFWDn84uILE5Wyyyyvy Wfba6+Qb636n72G3vkkpTr6tzN5q4uUbhHJbSN4Xd+TpRWNt7jnQB1JlxcDGYAQ/YZth xuLGhaxAudKyuFybPVZQI7Dr1S950+/F4hh+Dam2ixMMeOLUfWMP57QS72g+Hr5Dkd6o wxkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dS6Az5GdZwzc+HVwAElEaOUa+iqST3lgg/xrmF2h4pU=; b=22RGH5aP+R9SmZbN0G4QXDcJ0pvuOhW293x+WGb3lkJBu026gYBSuS3kvpDmue+iIC MmHizwXKw2Inaiwvwmhmo+Vrs6w07auW0XJ+NCRePYIjJ0LPI8YZld8bAHl5nBi0DSQB 1lx5VvYd7yhcW4TyQK2mrdv8x9QXx/SZu8jFBU+w69hM+buZPg7aRuWWzX6hZ6iVaq0P VZ3EJwCwKA7ATuCKQF1Yh3TvqE6yxs2HF2kTvc7uxj0ZEX677sFj4V1AmRLPPiH7KhN1 c24st/PIZm5hC4Ezx8bpPvAA8Sk/gc0zLJEB3nFmemOCYgptdKxBZby4SuV5lP1K2Cww XCoQ== X-Gm-Message-State: AOAM533oMf4T3CHuqePUd4HKwR1sBeG+kMX8nsXwMhCZ1yjgxD/ef3J8 n8fl5Eayn5wi+fjPPCoo1hvUi4Z6C4e/ygg7 X-Google-Smtp-Source: AGRyM1sycY9RSdK3c6tH5TCYoqCA7aYL9wBrZi3kXStuDwc1fKFdfGGObdGreMPvIpPtv2FbSU1Flw== X-Received: by 2002:aa7:d895:0:b0:42e:985:40f7 with SMTP id u21-20020aa7d895000000b0042e098540f7mr7062245edq.351.1655225285536; Tue, 14 Jun 2022 09:48:05 -0700 (PDT) Received: from localhost.localdomain (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id o18-20020aa7c7d2000000b004335e08d6c9sm7372305eds.33.2022.06.14.09.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 09:48:05 -0700 (PDT) From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= To: buildroot@buildroot.org Date: Tue, 14 Jun 2022 18:47:53 +0200 Message-Id: <20220614164755.716683-1-raphael.melotte@mind.be> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] support/testing: add new test for python-jmespath X-BeenThere: buildroot@buildroot.org 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: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= , Ricardo Martincoski Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Add a new rudimentary test inspired by the examples from jmespath's README file ([1]). [1]: https://github.com/jmespath/jmespath.py/blob/develop/README.rst Signed-off-by: Raphaël Mélotte --- .../testing/tests/package/sample_python_jmespath.py | 4 ++++ .../testing/tests/package/test_python_jmespath.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 support/testing/tests/package/sample_python_jmespath.py create mode 100644 support/testing/tests/package/test_python_jmespath.py diff --git a/support/testing/tests/package/sample_python_jmespath.py b/support/testing/tests/package/sample_python_jmespath.py new file mode 100644 index 0000000000..aefccd4fd8 --- /dev/null +++ b/support/testing/tests/package/sample_python_jmespath.py @@ -0,0 +1,4 @@ +import jmespath +expression = jmespath.compile('foo.bar') +res = expression.search({'foo': {'bar': 'baz'}}) +assert res == "baz", "expression.search failed" diff --git a/support/testing/tests/package/test_python_jmespath.py b/support/testing/tests/package/test_python_jmespath.py new file mode 100644 index 0000000000..80fd09fdde --- /dev/null +++ b/support/testing/tests/package/test_python_jmespath.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Jmespath(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_JMESPATH=y + """ + sample_scripts = ["tests/package/sample_python_jmespath.py"] + timeout = 10