From patchwork Fri Mar 1 12:33:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1050148 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SlAXriN/"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449pkW6sXwz9sNl for ; Fri, 1 Mar 2019 23:33:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A8E1B861C9; Fri, 1 Mar 2019 12:33:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UMnxqtLzazFd; Fri, 1 Mar 2019 12:33:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 24B5686226; Fri, 1 Mar 2019 12:33:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id CAC4B1BF2B6 for ; Fri, 1 Mar 2019 12:33:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C7E6F85082 for ; Fri, 1 Mar 2019 12:33:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JBJhccqoHV2l for ; Fri, 1 Mar 2019 12:33:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by fraxinus.osuosl.org (Postfix) with ESMTPS id C1AB885036 for ; Fri, 1 Mar 2019 12:33:50 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id z23so5866570lfe.0 for ; Fri, 01 Mar 2019 04:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6zqF9VMmFsXi5DRQs3GoS8VFhobIcYqhWocPeg/Vdbo=; b=SlAXriN/RJcze/NH2kM9RhFlf634PtcdO3QA1zKPwnsFxs4VUB5H/2fXxowkMl8h9X CbK742OeKSURO4vHxjSvftOWrNJdP9l37+nqJnxr0uqwx6B3Bq5NvTQ49JVXpDy6bzoD GJJsNYVJBskAa+uOwBq8wH80IKLelupWBuDEkLDsMH/eCxIyX1huJfA+D/WlduMA4Jf0 Yi2jMBrD532EGAl+PIy14zW0o9ONrfaaGqYFxcb/c11Yr8LNuEcVLMkl1jyWixMFgdD8 ky4RJnXxpUDq1dxrL9A2oeNgN18elz2Z8Q5KzpCZsWyhyPCN+h163uFYdzDM80clOklX z08Q== 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; bh=6zqF9VMmFsXi5DRQs3GoS8VFhobIcYqhWocPeg/Vdbo=; b=Yt/vYPBGEr7FBZ64DDKa8afYfByOkeSKNV3fYQPGUwVFtG9U8LuMaT51bSrwSorio0 iFtRqQshcAQ5CM2DDgSJXwLW8+qyYjgkRib6rfGcBvuUHKE3pEwZoHto4nQfyH77f72c lhvqa1Q6npHoiDGI8TItd06hgIT4/Mr+yPkvQRBix16cJ3usgrmq4mOMTN8IV/fGlWXw AU+DvcuaAv4oC5tbIu/LWCDZ62vJM7SzxV0AVpBBFiRC/rLnYd+3t04EKPGfhz+cQh/o 56McvlXD6ny2R4jxWPsMuaDDUpI+OBThfRWiKALinEZxQAJKBqcK3V4a7pW6wMwpKkjH TaZQ== X-Gm-Message-State: APjAAAVH1ZjSVZ64uCVPNdk21GnZ9fvfVvdUVVj1Jk4QI7A+A71uEjpH ybLZl/zPZKOtaxSuaPZHR+TzcjiS X-Google-Smtp-Source: APXvYqzxQXj7kYgUo/17s8cLxdsnM1M6wY6r/4vTqCXIDtmuJgYUbXfWcNbUFxorCpfc1HxIopHoTg== X-Received: by 2002:a19:ae0b:: with SMTP id f11mr3017167lfc.104.1551443628577; Fri, 01 Mar 2019 04:33:48 -0800 (PST) Received: from lwo1-lhp-f71841.synapse.com ([195.234.74.207]) by smtp.gmail.com with ESMTPSA id 129sm4044934lfk.82.2019.03.01.04.33.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Mar 2019 04:33:47 -0800 (PST) From: Vadim Kochan X-Google-Original-From: Vadim Kochan To: buildroot@buildroot.org Date: Fri, 1 Mar 2019 14:33:42 +0200 Message-Id: <1551443622-29498-1-git-send-email-email@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH 1/1] utils/test-pkg: Generate package config if it is not specified 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: Vadim Kochan MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Vadim Kochan It is possible to generate one-line config for the package just by normalize it to the form: BR2_PACKAGE_${pkg_replaced-to_and_uppercase} it simplifes a bit of testing package where no additional config options are needed. Signed-off-by: Vadim Kochan Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- utils/test-pkg | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/utils/test-pkg b/utils/test-pkg index 1995fa8..cce4679 100755 --- a/utils/test-pkg +++ b/utils/test-pkg @@ -2,12 +2,20 @@ set -e TOOLCHAINS_CSV='support/config-fragments/autobuild/toolchain-configs.csv' +TEMP_CONF="" + +do_clean() { + if [ ! -z "${TEMP_CONF}" ]; then + rm -f "${TEMP_CONF}" + fi +} main() { local o O opts local cfg dir pkg random toolchains_dir toolchain all number mode local ret nb nb_skip nb_fail nb_legal nb_tc build_dir local -a toolchains + local pkg_br_name o='hac:d:n:p:r:t:' O='help,config-snippet:build-dir:package:,random:,toolchains-dir:' @@ -50,8 +58,15 @@ main() { ;; esac done + + trap do_clean INT TERM HUP EXIT + if [ -z "${cfg}" ]; then - printf "error: no config snippet specified\n" >&2; exit 1 + pkg_br_name="${pkg//-/_}" + pkg_br_name="BR2_PACKAGE_${pkg_br_name^^}" + TEMP_CONF=$(mktemp /tmp/test-${pkg}-config.XXXXXX) + echo "${pkg_br_name}=y" > ${TEMP_CONF} + cfg="${TEMP_CONF}" fi if [ ! -e "${cfg}" ]; then printf "error: %s: no such file\n" "${cfg}" >&2; exit 1