From patchwork Thu Nov 23 15:12:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lussier-Cullen X-Patchwork-Id: 35138 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45C41C61DF7 for ; Thu, 23 Nov 2023 15:12:28 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.92933.1700752342850339738 for ; Thu, 23 Nov 2023 07:12:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=hdi6U+Sz; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alexander.lussier-cullen@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id DA9C89C352F for ; Thu, 23 Nov 2023 10:12:21 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id Cm74XLC-4QG3; Thu, 23 Nov 2023 10:12:21 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 603299C35A3; Thu, 23 Nov 2023 10:12:21 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 603299C35A3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1700752341; bh=ehnCDmw+ssA7V8H9dpY5nFoN00CbPWSPDreEycSDBXA=; h=From:To:Date:Message-Id:MIME-Version; b=hdi6U+Sz3hYjFP9dJVMc/oagiO2zcTjmI5z6DpM3kNNMM0N/TUjf1V6kixZo3T32s Toc5IhjXOlWS/JWhyXVbrx8j/yzZzqQHuRjEPFUFwExRlIEMoI6C+g25ErK7/dPb/d 8dML5WvhjfhLluXNZQXwYGyaMe9LMDu9IJxLWMSOj6hhr7Wn12OtR54rWSO4m3f5kx +FRjpnazysxNFVkp0l0wp9fwfJ+k3dawcIb6049nDa1EpczeIOfySPTxlfxtRQX8We WRrjv+uEwGPwRTewdD23/vMkb0QulqCn+pD8s+I9Q0A83QJUaao8gSyWVVbTPSzoDm h2C4y+yXWi6rQ== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id Bc4C2dUTc4jX; Thu, 23 Nov 2023 10:12:21 -0500 (EST) Received: from alex-GA-78LMT-USB3.home (bras-base-mtrlpq427kw-grc-24-184-147-255-35.dsl.bell.ca [184.147.255.35]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 4630E9C3506; Thu, 23 Nov 2023 10:12:21 -0500 (EST) From: Alexander Lussier-Cullen To: toaster@lists.yoctoproject.org Cc: Alexander Lussier-Cullen Subject: [PATCH 1/2] Toaster: tests: add passthroughs for relevant build environment variables Date: Thu, 23 Nov 2023 10:12:14 -0500 Message-Id: <20231123151215.4390-2-alexander.lussier-cullen@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231123151215.4390-1-alexander.lussier-cullen@savoirfairelinux.com> References: <20231123151215.4390-1-alexander.lussier-cullen@savoirfairelinux.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 23 Nov 2023 15:12:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6021 Toaster build tests create new build environments which do not utlize any existing build environment variables. In particular, DL_DIR and SSTATE_DIR from an existing environment can be passed in to allow for faster builds. Adding these as passthroughs specifically resolves slow builds related to the autobuilder integrations of the toaster test suite. Signed-off-by: Alexander Lussier-Cullen --- bitbake/lib/toaster/tests/builds/buildtest.py | 9 +++++++++ bitbake/lib/toaster/tox.ini | 3 +++ 2 files changed, 12 insertions(+) diff --git a/bitbake/lib/toaster/tests/builds/buildtest.py b/bitbake/lib/toaster/tests/builds/buildtest.py index 13b51fb0d8..53cd7a9ffa 100644 --- a/bitbake/lib/toaster/tests/builds/buildtest.py +++ b/bitbake/lib/toaster/tests/builds/buildtest.py @@ -116,6 +116,15 @@ class BuildTest(unittest.TestCase): project = Project.objects.create_project(name=BuildTest.PROJECT_NAME, release=release) + passthrough_variable_names = ["SSTATE_DIR", "DL_DIR"] + for variable_name in passthrough_variable_names: + current_variable = os.environ.get(variable_name) + if current_variable: + ProjectVariable.objects.get_or_create( + name=variable_name, + value=current_variable, + project=project) + if os.environ.get("TOASTER_TEST_USE_SSTATE_MIRROR"): ProjectVariable.objects.get_or_create( name="SSTATE_MIRRORS", diff --git a/bitbake/lib/toaster/tox.ini b/bitbake/lib/toaster/tox.ini index d058558b05..9928657106 100644 --- a/bitbake/lib/toaster/tox.ini +++ b/bitbake/lib/toaster/tox.ini @@ -5,6 +5,9 @@ toxworkdir = {env:TOX_WORKDIR:.tox} passenv = * [testenv] +passenv = + SSTATE_DIR + DL_DIR setenv = DJANGO_SETTINGS_MODULE=toastermain.settings_test TOASTER_BUILDSERVER=1