From patchwork Sun Sep 19 21:14:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529884 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=l+7p11Tp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4HCL862H4pz9sW4 for ; Mon, 20 Sep 2021 07:15:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E5B9983273; Sun, 19 Sep 2021 23:15:33 +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="l+7p11Tp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2C808325E; Sun, 19 Sep 2021 23:15:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (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 EB0D98322E for ; Sun, 19 Sep 2021 23:15:00 +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-x236.google.com with SMTP id w206so10428932oiw.4 for ; Sun, 19 Sep 2021 14:15:00 -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=aPDTWhVKSxdEVzfRLGLY/HufJRlHv8pc5JKBGUGMMIk=; b=l+7p11TpeHSt+R9YkCA9vulPUcby1k57g7Ms+a1UT/JA4+OZtzNTWBWA4ERaxw5b8b fQ+uty5jaUgPKczSMDCZpJz3nHDUM2fjUZ7hfJcCLZ5MRQdwP+5bB22/gGOm9X1XFZ8R OmNAalpzCqimib9AeOwSwerE1CfEx8BZaDTCI= 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=aPDTWhVKSxdEVzfRLGLY/HufJRlHv8pc5JKBGUGMMIk=; b=ya9WqAx+lW3+QolQEZcCJv5kXjg7lFal7R5Ix0tc87340oLe7WXZpBkPFp6PyZ0P/f crdn2cK8NU19hUrtG0u+obQd7FE8gqjGVJUkcXrP5T+PT0eWiNWDPuCfRF4UKOiqbMVo 5lJRIC4DhGwkaMTxv+6ZUp9XifJKdcY+cyMN76D3AOxMJxeXi9uZNpB+paA/yeVt6M9E cZmF3jKaI2sBYpe9Z99Tcy1fGT0m1Gpk1P1szU+lokRC8kZGv1gkVoGYb7JBVLfh1GVp eJVUOnJgvNLzTmL07xG9bfk/pDqk9KNfZlx5VNKr4q//7GeNIqmsp4L10DUZ6WExqcNz dJZg== X-Gm-Message-State: AOAM533IsnJpZ6sU/arI2w+uF+2iEkBaDlLPw3ipj/ABudUzf6b4LBgM RwzOa/IwyLbX0idLsm9Zc4AcW26CvtCpuA== X-Google-Smtp-Source: ABdhPJxVYCml6K6G0/giz6Dj6haeKfL2T07hhKmGl7u+3eoJwegX/pWqaSSZb71o6asn4xesWomOBQ== X-Received: by 2002:aca:c2c6:: with SMTP id s189mr19692951oif.123.1632086099182; Sun, 19 Sep 2021 14:14:59 -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 b11sm3082118ooi.0.2021.09.19.14.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 14:14:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Stephen Warren , Stephen Warren , Simon Glass Subject: [RESEND PATCH v2 4/4] doc: test: Explain how to run pytests in parallel Date: Sun, 19 Sep 2021 15:14:51 -0600 Message-Id: <20210919151448.RESEND.v2.4.I4b868f615036d4b8bc4d9f6a8555db49be9f6009@changeid> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog In-Reply-To: <20210919211451.3825645-1-sjg@chromium.org> References: <20210919211451.3825645-1-sjg@chromium.org> MIME-Version: 1.0 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 Add documentation for this so people can try it out. At present it does not fully work. Signed-off-by: Simon Glass --- Changes in v2: - Add documentation for how to run parallel tests doc/develop/py_testing.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/develop/py_testing.rst b/doc/develop/py_testing.rst index c4cecc0a01b..4f1e1f66e76 100644 --- a/doc/develop/py_testing.rst +++ b/doc/develop/py_testing.rst @@ -103,6 +103,36 @@ will be written to `${build_dir}/test-log.html`. This is best viewed in a web browser, but may be read directly as plain text, perhaps with the aid of the `html2text` utility. +Running tests in parallel +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Note: This does not fully work yet and is documented only so you can try to +fix the problems. + +First install support for parallel tests:: + + pip3 install pytest-xdist + +Then build sandbox in a suitable build directory. It is not possible to use +the --build flag with xdist. + +Finally, run the tests in parallel using the -n flag:: + + # build sandbox first, in a suitable build directory. It is not possible + # to use the --build flag with -n + test/py/test.py -B sandbox --build-dir /tmp/b/sandbox -q -k 'not slow' -n32 + +At least the following non-slow tests are known to fail: + +- test_fit_ecdsa +- test_bind_unbind_with_uclass +- ut_dm_spi_flash +- test_gpt_rename_partition +- test_gpt_swap_partitions +- test_pinmux_status +- test_sqfs_load + + Testing under a debugger ~~~~~~~~~~~~~~~~~~~~~~~~