Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lCw1c-0006JQ-BT for mharc-grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCw1a-0006Fh-Nc for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:10 -0500 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:37134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCw1Y-0005Z4-CG for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:10 -0500 Received: by mail-qt1-x830.google.com with SMTP id v3so3044253qtw.4 for ; Thu, 18 Feb 2021 19:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+taNa2NcwkKxvuByDtkBWmhuQx1VzHXsitzRQjFLQ7k=; b=v5dlRBewhgTCAoIfK6pj4Xzj+0TUbrTq5RaB9GOzpGedIFES2WI5xrEPt3x+fiIAz3 7cWz9HfGi3zeIc7mc7jbzo7UG9fUXJ/dkNNTYklofEesSvMdGiQ2fiznHFuTslBeeSyg NFdZpHczrUKL+eIiiaNWjGWL9fDiK1MSf3EWG4dwIe28WhTYIOvjw/012vBxJQELhlLW x8wRrmbXHmDghySz5y11sUlmxYlVSCoWkn/1tP8wDM3XYR29LxOyRKC8PlMD1B7Vp7vR 54c4xZYbVWgZyZpdxaYt/Vr/AJyL5oZSBUmX7wSUA9Fvda7fYjypgD5To3WDcH+CSmr7 bnyQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+taNa2NcwkKxvuByDtkBWmhuQx1VzHXsitzRQjFLQ7k=; b=m9iz0GLjpkZQuwSxs7CaJJiEJKY/WUARdeQmofzJDsdnrzhhB830wlaCL3LtIEm4EI CqQ0ksDQ1qv0QCubD6ZVcTaRSczCIggLrp2jurTIlleTjwLewYBJJcvtx7PbeHVsuw8s T5wcN0CK1zIRrw3Zom5FehyX2H9GvPzq3hnowuUwwPZedR09gw6OqIDy2hl1Cjnu9bK3 VILuOIRx5m4jV0TPom9Bf37scX/ecYiZXp3ZOftJDgFNjLnRes5/SSsn5ZKr0aObvXjx 76QQofb2O092fLssJNnjeY8xYPUA7n7Uh3vG7HFcML66YiiWgwbjeHrdF/fB5s1xiVGt EcSw== X-Gm-Message-State: AOAM5322hDxH5T3tL3JK0pl/0p1kryzsVC+3mFgPWQhgwsmJm5Qksls8 US/AF27hsFhVRp/l6aVDXPS0SPmKEspevg== X-Google-Smtp-Source: ABdhPJzkCIIRskEg1EVx3s9m5bhYYGnAA1JhNU2VWDYnWosYkRuiDjeYPPx1J2bZv2L7CT7Kj/lhpA== X-Received: by 2002:ac8:6b50:: with SMTP id x16mr7285287qts.91.1613703606997; Thu, 18 Feb 2021 19:00:06 -0800 (PST) Received: from localhost.localdomain ([2605:a601:aac5:3700:c323:c101:d96b:34f1]) by smtp.gmail.com with ESMTPSA id b17sm2468294qtq.56.2021.02.18.19.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 19:00:06 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org Cc: Daniel Kiper , Glenn Washburn Subject: [CI 12/17] tests: Allow turning on shell tracing from environment variables Date: Thu, 18 Feb 2021 20:59:31 -0600 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=development@efficientek.com; helo=mail-qt1-x830.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 03:00:11 -0000 This allows turning on shell tracing when its not practical or not possible to use commandline arguments. Turn on tracing when the envvar is an integer greater than 1, since these can log a lot of messages. Signed-off-by: Glenn Washburn --- tests/util/grub-fs-tester.in | 2 ++ tests/util/grub-shell.in | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index 4213b7bfc..9a5f409e9 100644 --- a/tests/util/grub-fs-tester.in +++ b/tests/util/grub-fs-tester.in @@ -2,6 +2,8 @@ set -e +[ "${GRUB_TEST_DEFAULT_DEBUG:-0}" -gt 1 ] && set -x + fs="$1" GRUBFSTEST="@builddir@/grub-fstest" diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 40c62b9fd..3b6bce4c2 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -215,6 +215,7 @@ esac timeout=${GRUB_SHELL_DEFAULT_TIMEOUT:-60} mkimage_extra_arg= +debug=${GRUB_SHELL_DEFAULT_DEBUG} # Check the arguments. for option in "$@"; do @@ -234,7 +235,7 @@ for option in "$@"; do --no-trim) trim=0 ;; --debug) - debug=1 ;; + debug=$((debug+1)) ;; --modules=*) ms=`echo "$option" | sed -e 's/--modules=//' -e 's/,/ /g'` modules="$modules $ms" ;; @@ -319,6 +320,8 @@ for option in "$@"; do esac done +[ "${debug:-0}" -gt 1 ] && set -x + if [ "x${source}" = x ] ; then tmpfile="$work_directory/testcase.cfg" while read REPLY; do -- 2.27.0