Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nIHNg-000455-V7 for mharc-grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIHNd-00041C-0r for grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:34 -0500 Received: from [2607:f8b0:4864:20::f33] (port=36420 helo=mail-qv1-xf33.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIHNb-0008KL-4l for grub-devel@gnu.org; Thu, 10 Feb 2022 16:53:32 -0500 Received: by mail-qv1-xf33.google.com with SMTP id o5so6514459qvm.3 for ; Thu, 10 Feb 2022 13:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zWdOO5xN/anyXpYSozNpxr8BHh1+cuqL6Vx9nB7dYdY=; b=CSaX3EbvKBAZanDs8LcPUksbjDRoftH70YDHAgmUxWOevybnPFhomrSV1a5icpY+Hk fATex4rpuJEqxZ21F4gI7pQ3oFGB4IaX8zoTrTWpQnaADKHzJm1tB4PhWl2cXapLJqhF vIiM551xv4urH2wErCP11hgnrxUPjw4mgSCrlM4FhKs88meDFD8vgKR9esKII72uKzXz 1ssr/geLjXUm3pkSrUWwuJPr3ngbbSRiRxOrCdsR2Rm/QQt7/eKeV96KJ4J7XCnx/OWm t/dk5GPxbiVB8u3qG+xMn3s2KDC2adB3oI7UD9k0R7j52QX5tSc0A2r9luk31K+ksyOs zkYA== 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=zWdOO5xN/anyXpYSozNpxr8BHh1+cuqL6Vx9nB7dYdY=; b=L7ttSglJehwA0TgDXr2bj68ol9FbiAf5HF19G4S2GsttlsxnOYUG0RiKd2O3+tsU32 m2ealMnpvdDvmOR5KIaniDpiVSvttbx3PvF5a2qzsu25N0JFkjiM3Q6nLQlKYSvTXXCI eSFA+rFEr2snfsi4FZkmHQOrNyhIdNg/rMNXLvkzpd/Fu4Z9mF/mhCerNP9X+ycwKkPy aV8jz/MlOqFtspD1z7K3W+KZGshkD2a428v7WQPIGUfNF1uJBH0zq7OXHRXRY3/dQ9gA VuBY6kMzqKPm/10dpJcDtx5ZjKXUPuunDX/C9VFRqrPHmtIwVbWKKolz7DHMfwSkb4PI EWwg== X-Gm-Message-State: AOAM532ecLMgdbuhWLcLZfvXxsATSC51hVzEnRLon0QbNDRqkB+R8z0t P1kHYM3DIN+3bbNSDI0hYcyLiJFRi2/z+g== X-Google-Smtp-Source: ABdhPJzPTwWLnrviuMCT58lkBKTt/zLgVfnzCAXZaqNbsFaqoGkBP0oHweye7RoXgw5NM8F/2n87ow== X-Received: by 2002:a05:6214:4006:: with SMTP id kd6mr4141708qvb.70.1644530009865; Thu, 10 Feb 2022 13:53:29 -0800 (PST) Received: from localhost.localdomain (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id j15sm11740363qta.83.2022.02.10.13.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 13:53:29 -0800 (PST) From: Glenn Washburn To: Daniel Kiper , grub-devel@gnu.org Cc: Glenn Washburn Subject: [PATCH v3 11/15] tests: Allow turning on shell tracing from environment variables Date: Thu, 10 Feb 2022 15:51:28 -0600 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f33 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=development@efficientek.com; helo=mail-qv1-xf33.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2022 21:53:34 -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 2dcd09f5e..6b8028f9b 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 fdabc6171..a1c7b9265 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:-$GRUB_TEST_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