From patchwork Tue Jan 15 14:11:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1025195 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="ima2Gtwn"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43fC295wvKz9sCs for ; Wed, 16 Jan 2019 01:11:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9BEA486E2C; Tue, 15 Jan 2019 14:11:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qUO74Wtm6EIC; Tue, 15 Jan 2019 14:11:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AA48686DEA; Tue, 15 Jan 2019 14:11:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 30F861BF295 for ; Tue, 15 Jan 2019 14:11:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2E7C12266F for ; Tue, 15 Jan 2019 14:11:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fnsHt9JcxZ1G for ; Tue, 15 Jan 2019 14:11:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by silver.osuosl.org (Postfix) with ESMTPS id 9A81F22640 for ; Tue, 15 Jan 2019 14:11:38 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id y20so2623700edw.9 for ; Tue, 15 Jan 2019 06:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g7l+1RcazxzWlwX6aqNYZ9cYdWe+kALElp1hIIyvwUY=; b=ima2GtwnVX2+UsQ0V/+EvFsuqVg48HFFdfyFfWOkW8AQ99rxZKffN62ivrYy5ZTp1X M8iRr2YDlXYiNOapKTY/eLkEo3pCq3cmot4JiqIsE3AkSADHkbKDe+pHi+CEUkQ2c3kq cJiINHT25qXPU8XwvBkMpcYpJ7+GwPbR5QiSSvmZwHeiqVhbNDHQKK1Facn/RaHKcF6i yf5t2utRtNEN4zCXW6gCwmjADpwnRGkOJ3Tw9x1WMB8vs7Ct99H/jVn7CFgfCbuxuluj TbHDAOzUR5xaK+fBDtDcwCtBNPHqfEG76cA4xZsHToSQp5bIacgo3FEfPI8S+UJVmPox NmHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g7l+1RcazxzWlwX6aqNYZ9cYdWe+kALElp1hIIyvwUY=; b=cpl5x0QfUvFhJHW0kAWH2O4NJ61bDhuxwI7cxOuL8MNnBJk5BHLQMQB39raFXeoaKN ohNrI48Rnd5IIbAcx67J+gC4wdFOPAZFWVKXdkNySQ7dxNtBhLh+S69B8funhII9NUUO DxgcWkuBFpb8eUXRrI2kgPq28lnNP8PxLgcXm0zOZMekSEVishhq8rOttl3BodpWzBzu 7XvV+8GZywlD9ur44GqGaIN7EmCCdiRxq7fEu9fkWViMbrsAQx/hPgGxiVqSjYTPZEWG nUp0aCawx8qIqN6KNyWgF8JswadAfEbh6hI9MQuEfwbwlctbhf69mxIyffLddNKE4tQH luXg== X-Gm-Message-State: AJcUukel/2/6XMVFTCTqXWor9tb1YAkBt5gJVjDaZL1Ic8WWhoVPtGo7 bubbCZCb6ASGYEFfIxzXFIl36+c5oPI= X-Google-Smtp-Source: ALg8bN7Nrf/C93XGsaKwij1rTsQagJxaJ14mDo0ub1dgBWVIiqmgRD3p8gn3zfnlBHjIjRoAj+h7zg== X-Received: by 2002:a50:b103:: with SMTP id k3mr3424450edd.247.1547561496361; Tue, 15 Jan 2019 06:11:36 -0800 (PST) Received: from arnout-laptop.local.ess-mail.com (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id y4-v6sm2715132ejc.10.2019.01.15.06.11.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jan 2019 06:11:35 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Tue, 15 Jan 2019 15:11:31 +0100 Message-Id: <20190115141131.22754-1-arnout@mind.be> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] scripts/autobuild-run: add --branches option X-BeenThere: buildroot@busybox.net 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: Arnout Vandecappelle Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Arnout Vandecappelle The autobuild-run script will retrieve the list of branches to test from autobuild.buildroot.org. However, it the autobuild script is used to test some local configuration, this is probably not appropriate. The new --branches option allows to override the URL of the branches CSV file. A file:/// URL can be used for a local file. Signed-off-by: Arnout Vandecappelle --- scripts/autobuild-run | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 3d2e99a..77272f5 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -69,6 +69,7 @@ defaults = { '--http-url': 'http://autobuild.buildroot.org/submit/', '--toolchains-csv': 'support/config-fragments/autobuild/toolchain-configs.csv', '--repo': 'https://github.com/buildroot/buildroot.git', + '--branches': 'http://autobuild.buildroot.org/branches', } doc = """autobuild-run - run Buildroot autobuilder @@ -106,6 +107,8 @@ Options: --toolchains-csv CSVFILE Toolchain configuration file -r, --repo URL URL of Buildroot repository to clone Defaults to %(--repo)s + --branches URL URL of CSV file with branches to test + Defaults to %(--branches)s Format of the configuration file: @@ -185,7 +188,7 @@ def check_version(): print("ERROR: script version too old, please upgrade.") sys.exit(1) -def get_branch(): +def get_branch(url): """Returns the branch that should be built. It fetches a CSV file from autobuild.buildroot.org that provides the list of branches to test (first field) and their weight (second field). We build a list of @@ -194,7 +197,7 @@ def get_branch(): list. This way, branches with a higher weight are more likely to be selected. """ - with urlopen_closing('http://autobuild.buildroot.org/branches') as r: + with urlopen_closing(url) as r: csv_branches = r.readlines() branches = [] for branch in csv.reader(csv_branches): @@ -314,7 +317,7 @@ def prepare_build(**kwargs): os.path.relpath(f, dldir)) os.remove(f) - branch = get_branch() + branch = get_branch(kwargs['branches']) log_write(log, "INFO: testing branch '%s'" % branch) # Clone Buildroot. This only happens if the source directory @@ -764,6 +767,7 @@ def main(): nice = (args['--nice'] or 0), toolchains_csv = args['--toolchains-csv'], repo = args['--repo'], + branches = args['--branches'], upload = upload, buildpid = buildpid, debug = args['--debug']