From patchwork Fri Jul 5 09:14:07 2024 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: 1957208 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFnsC3kgtz1xql for ; Fri, 5 Jul 2024 19:14:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 298E840B57; Fri, 5 Jul 2024 09:14:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id D0YnBmrYPZjg; Fri, 5 Jul 2024 09:14:35 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 143E340B37 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 143E340B37; Fri, 5 Jul 2024 09:14:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 212671BF31D for ; Fri, 5 Jul 2024 09:14:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0E91B6066D for ; Fri, 5 Jul 2024 09:14:31 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Oe4IRl4HkIQM for ; Fri, 5 Jul 2024 09:14:30 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::331; helo=mail-wm1-x331.google.com; envelope-from=raphael.melotte@essensium.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 29DE160668 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 29DE160668 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by smtp3.osuosl.org (Postfix) with ESMTPS id 29DE160668 for ; Fri, 5 Jul 2024 09:14:30 +0000 (UTC) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4256eec963eso9485235e9.1 for ; Fri, 05 Jul 2024 02:14:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720170868; x=1720775668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+AaUukI2H8Z/PULBBOztJFBzAcYWIPoIQBuuWqbqFrY=; b=vrwgFV2KnKGzCPkT150n2/I+jftxJ1tQt7FQhjEl7of7Kub2fdfZlDQxttqQuzrhxZ Fo0qo58Sug0XHeo0ij1PdtzG0NrfZ60yyMUWiqtz49QU51L+smHKgAmoUyo6tkRS78/i FT5BmAcNhA2jsfhndI5DfbAFDStrM+vMQa2vS+DqetbVvE0vbiaQLVHulhtBZSZEfKez +NTXUv+lRpyrxGbJcjbXrQX/xmwTT/r6rTeClX+URgQSFB8k8q7rSqGcm0pga0Fyo1sU WuOiDcewc9e/SrPo72vlnk2I+eiTpPuES79Mic3O1GcVhSBosRDSfkXvX/4mAWNrE7wN +nYw== X-Gm-Message-State: AOJu0YxW9sqcUX6+gp+i6uRbAELvLEQPZz/jCde9sunAqHw2NUxMtgS0 XI95HDeLyKj8zE7fg7YvfyqqPNLCsYLUmkhkleUqk9Bfvjl9OZ5cuDEUDqKwBHgaIUVS4gPbCm5 Wsow= X-Google-Smtp-Source: AGHT+IGXHsDIjYwkczgCzTyEDUzNXOY/oCqIRPUwtYQvMSnwfkOSXWFPGZeL68oVHGSRpKN+GsY+hQ== X-Received: by 2002:a7b:cd95:0:b0:425:6dce:8c54 with SMTP id 5b1f17b1804b1-4264a48c4e0mr23369565e9.33.1720170868161; Fri, 05 Jul 2024 02:14:28 -0700 (PDT) Received: from junian.fritz.box (94.105.103.7.dyn.edpnet.net. [94.105.103.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-367963fa692sm5486844f8f.85.2024.07.05.02.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 02:14:27 -0700 (PDT) To: buildroot@buildroot.org Date: Fri, 5 Jul 2024 11:14:07 +0200 Message-Id: <20240705091409.3370272-2-raphael.melotte@mind.be> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240705091409.3370272-1-raphael.melotte@mind.be> References: <20240701145708.2886402-1-raphael.melotte@mind.be> <20240705091409.3370272-1-raphael.melotte@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1720170868; x=1720775668; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+AaUukI2H8Z/PULBBOztJFBzAcYWIPoIQBuuWqbqFrY=; b=ZnxxIN5mRZnWK4zfa0/lgvCVZeG3kQIITtu+MDVX7UZ2Ch+iSYl4C5zjN5qJ7f+aDU nPeP436nIj6XX78CrKNEPxpbE4MQgH+ATyUZyBtR3pHlBnFZbvyOib03UJ3UVJOIWVa0 IdaXxQcASwWD2TYVd/m791Si6Rc2z1Z7Zn9HBRnDmvesPfJ1Gzw2qWXR8ZUKrQOU4K9l FvkkuAkidE9KzfN/te0OK6qF2K9GlONOOleXlBGWRG/o+k9CVs1W4IaE3IADHzDhB1kD zuiJ9DKbsY27kYlAcp7Ow0dE+vRGX4rZ5pPGZN3rbvR543A9LFHlC/exy6bv5EYLL6fp K44g== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=mind.be X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ZnxxIN5m Subject: [Buildroot] [PATCH v2 2/4] support/testing: add new test for python-sdbus 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: , X-Patchwork-Original-From: =?utf-8?q?Rapha=C3=ABl_M=C3=A9lotte_via_buildroot?= From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Reply-To: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Cc: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Raphaël Mélotte --- DEVELOPERS | 2 ++ .../testing/tests/package/sample_python_sdbus.py | 13 +++++++++++++ support/testing/tests/package/test_python_sdbus.py | 12 ++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 support/testing/tests/package/sample_python_sdbus.py create mode 100644 support/testing/tests/package/test_python_sdbus.py diff --git a/DEVELOPERS b/DEVELOPERS index 0d58df7d50..146c6ffea5 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2672,9 +2672,11 @@ F: package/python-sdbus/ F: support/testing/tests/package/sample_python_jmespath.py F: support/testing/tests/package/sample_python_rsa.py F: support/testing/tests/package/sample_python_s3transfer.py +F: support/testing/tests/package/sample_python_sdbus.py F: support/testing/tests/package/test_python_jmespath.py F: support/testing/tests/package/test_python_rsa.py F: support/testing/tests/package/test_python_s3transfer.py +F: support/testing/tests/package/test_python_sdbus.py N: Raphael Pavlidis F: package/nvidia-persistenced/ diff --git a/support/testing/tests/package/sample_python_sdbus.py b/support/testing/tests/package/sample_python_sdbus.py new file mode 100644 index 0000000000..68131cede5 --- /dev/null +++ b/support/testing/tests/package/sample_python_sdbus.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sdbus +from sdbus_block.dbus_daemon import FreedesktopDbus + +s = FreedesktopDbus(sdbus.sd_bus_open_system()) + +props = s.properties_get_all_dict() + +print(props) + +# Check for a randomly chosen interface: +assert 'org.freedesktop.DBus.Monitoring' in props['interfaces'] diff --git a/support/testing/tests/package/test_python_sdbus.py b/support/testing/tests/package/test_python_sdbus.py new file mode 100644 index 0000000000..7163bbeed1 --- /dev/null +++ b/support/testing/tests/package/test_python_sdbus.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Sdbus(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_INIT_SYSTEMD=y + BR2_PACKAGE_PYTHON_SDBUS=y + """ + sample_scripts = ["tests/package/sample_python_sdbus.py"]