From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lRmbC-0006h9-Mr for mharc-grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRmbB-0006fA-E0 for grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:17 -0400 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:44919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRmb4-0007Jo-Pt for grub-devel@gnu.org; Wed, 31 Mar 2021 21:58:15 -0400 Received: by mail-ot1-x32c.google.com with SMTP id y19-20020a0568301d93b02901b9f88a238eso718164oti.11 for ; Wed, 31 Mar 2021 18:58:09 -0700 (PDT) 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=rzgcpKdqm+3oiARcrT67pwzlvlZjNRtXS503Uxoa7j4=; b=Xcwp53l7VYmLcOAXZj3U7J5Iit8+iWLcNSId3t6Ft1967M8s7ssCIqUhYB2H3zsjXx TX5v0uM1dbdPSw6Ebw1pD9InF2DYsgycAxeaAAh8BASMz40MAmc2nqKjo1DUrQILmeKI gVJe1z3ao/vQIgYwk4LDrfHdvQgSQupM1VzVO7iJSbyptV2q7YRrFQs4uXZDqrMYksf3 w5oR/O4IUmYcqrPx+9vxzL6dMAPVLXpuxnSW9ajcZoAp0XJTfE6i72Fwvs0XglCThGUi vvHmBJ8W4a6CBj2GT2brtQ3q3GqaFwyIUVLCFyD89DzMrDjQWsT12H3PJSVYjdMt9PSb z4FQ== 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=rzgcpKdqm+3oiARcrT67pwzlvlZjNRtXS503Uxoa7j4=; b=l+IZSOGj40u+M1fVwO+Kz8x8++jEIKSmEZNqnEyKW2KCqYYAnmgl+X9S7AU0o/H0Gg bryyHQk/1HpjUfK+BhnLZSv28moaKZqCH8E96kPqri47N28HIv8OU/rZzpYSOlQpdgrk r0dTpJVS4kIpBfHc9Wl0YWlrIEagiqe23sqBAhMYyUFLzlpzqK4LcTl5psrGltTs+1EO gKJRyixw8wHMc3NeXaRofvtdvxrn7WmtTVmJrnPMxoooCbquerJ/J31/90AFrwpMXQe4 2KjwoM36e0MU6WhdWFyrWNVfL4R9V37RNB1pW+9oXUbsI7apQEuMv0SJWsiWOigj5VgI u5Ug== X-Gm-Message-State: AOAM531xJBjQprJT7kCJnOrDuZZpBcJlsIn1UB8M1pejE2niSdlxdl3G 7f9j63CDK1ajHqim3MI9PWSxGxkzXJx47g== X-Google-Smtp-Source: ABdhPJzhu47/Tn4DYRA7o2V9ZJ6BBLlfGUGMmcmqGlMD8+cPruWv+ggRQJDZsVQbjYXp81FfFcStgA== X-Received: by 2002:a05:6830:1b68:: with SMTP id d8mr4772449ote.235.1617242288959; Wed, 31 Mar 2021 18:58:08 -0700 (PDT) Received: from localhost.localdomain ([2605:a601:ab16:db00:1cb0:2038:b70a:65b5]) by smtp.gmail.com with ESMTPSA id z25sm902960otj.68.2021.03.31.18.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 18:58:08 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 08/12] tests: Allow turning on shell tracing from environment variables Date: Wed, 31 Mar 2021 20:57:47 -0500 Message-Id: <7450f6e3a6239231f39e19ecf9810432a9999da8.1617240986.git.development@efficientek.com> 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::32c; envelope-from=development@efficientek.com; helo=mail-ot1-x32c.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: Thu, 01 Apr 2021 01:58:17 -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 bfc425e1f..adeffbfba 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..198b03057 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