From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4C33C433F5 for ; Sat, 23 Oct 2021 23:29:07 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C40C60C4D for ; Sat, 23 Oct 2021 23:29:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C40C60C4D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1AF458350D; Sun, 24 Oct 2021 01:28:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Fyac7vHg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C791E83460; Sun, 24 Oct 2021 01:27:29 +0200 (CEST) Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AAA5D81EE5 for ; Sun, 24 Oct 2021 01:27:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22b.google.com with SMTP id z126so9995723oiz.12 for ; Sat, 23 Oct 2021 16:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1YxWrf3tPycS1giVioz0tCsYlYDCd0jHgtJY5XNAjsI=; b=Fyac7vHgphshqqopSRTpgduApTuvviY/7xTeMLqYkVegXmip0EUoulHonOXnQocnkX FX0dEk5gAdz1nXSq3+d7sUonPEFpUNAxWzd9HrEiVdvZRvkltsWJDaUuN6j7UTuAymm0 TwhIQMrlfKjb+ZunEkt3KrPOSUFGxO3c5h67I= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=1YxWrf3tPycS1giVioz0tCsYlYDCd0jHgtJY5XNAjsI=; b=kTq4qacKDgs5NKZMoELJuYzPbRSJv/poO6V15MDuC910HUyO+VgkgUKsgmnrQRrnBM xrlxMOMG9hAt1G+sWKqsgtCfxh8moe1tm4NkK5P98FfsU9wTbBHZrmc6o26gDgT+oqG8 XWAw8S7A6H1+/Bd48il3WXeav5f13hAZIQgczAO/j8Yj3Qylpid5TPEmk2jbqhc1FoEZ znMqNXT1nx2CDNwS2AwuIiseTm86RKhNgAMQE95D18094judkoxwXtcywTHegFxhSDkT 6sqlO4QA/7Is/Depxf44MsSqEFBWUm+vS3ty4OhUEeuS9/cUfhoEmKx3WDS9DbZ1LKJ0 1kSg== X-Gm-Message-State: AOAM533gRbtho68Ukw5P1tsa66zhtNkcek7xOhSUnG4UAAdgcmWC1A3f jbVaHsL6PL0Ws2jx8bFpCdjr0F1ST98Dew== X-Google-Smtp-Source: ABdhPJxlAq6zE2mvWQFAphNXBqkN9ybZswEH+elrnpKcd0+GP23RJPigflkzMBMMxUj7oG1sJglEbg== X-Received: by 2002:aca:af84:: with SMTP id y126mr17092637oie.20.1635031623152; Sat, 23 Oct 2021 16:27:03 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id l24sm2253885oop.4.2021.10.23.16.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 16:27:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Michal Simek , Heinrich Schuchardt , Tom Rini , Ilias Apalodimas , Daniel Schwierzeck , Steffen Jaeckel , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Lukas Auer , Dennis Gilmore , Simon Glass , Stephen Warren , Stephen Warren Subject: [PATCH v2 17/41] test/py: Relax the naming rules for unit tests Date: Sat, 23 Oct 2021 17:26:11 -0600 Message-Id: <20211023232635.9195-16-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog In-Reply-To: <20211023232635.9195-1-sjg@chromium.org> References: <20211023232635.9195-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean At present the collection function used by pytest is quite strict on the naming of the functions it detects. In particular it requires the name of the test to be repeated in the function name. This is not enforced anywhere else, but instead the tests are silently omitted from the pytest run. This affects a few dozen tests. The rule does not seem to have any particular purpose. Relax it, so that all tests that use the UNIT_TEST() macro will run, regardless of the name of the test function. Signed-off-by: Simon Glass --- (no changes since v1) test/py/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index 11a3f307ea8..16e445cd8ee 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -226,7 +226,7 @@ def pytest_configure(config): import u_boot_console_exec_attach console = u_boot_console_exec_attach.ConsoleExecAttach(log, ubconfig) -re_ut_test_list = re.compile(r'[^a-zA-Z0-9_]_u_boot_list_2_ut_(.*)_test_2_\1_test_(.*)\s*$') +re_ut_test_list = re.compile(r'[^a-zA-Z0-9_]_u_boot_list_2_ut_(.*)_test_2_(.*)\s*$') def generate_ut_subtest(metafunc, fixture_name, sym_path): """Provide parametrization for a ut_subtest fixture. -- 2.33.0.1079.g6e70778dc9-goog