From patchwork Wed Feb 5 21:34:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1234032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48CZbS1SlBz9sRK; Thu, 6 Feb 2020 08:34:57 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1izSJx-0003qK-50; Wed, 05 Feb 2020 21:34:53 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1izSJv-0003qE-6v for fwts-devel@lists.ubuntu.com; Wed, 05 Feb 2020 21:34:51 +0000 Received: from 2.general.alexhung.us.vpn ([10.172.65.255] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1izSJu-0003Jd-HD; Wed, 05 Feb 2020 21:34:50 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] live-image: replace hard-coded "oem-tests.lst" by a variable Date: Wed, 5 Feb 2020 14:34:46 -0700 Message-Id: <20200205213447.18509-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" --- live-image/fwts-frontend-text | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Acked-by: Ivan Hu Acked-by: Colin Ian King diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text index c7922aa4..7b16b981 100755 --- a/live-image/fwts-frontend-text +++ b/live-image/fwts-frontend-text @@ -20,6 +20,7 @@ FWTS="Firmware Test Suite" OPTIONS="/tmp/options.$$" DIALOG_CMD="/tmp/fwts.cmd.$$" +OEM_TESTS_FILE="/fwts/oem-tests.lst" export DIALOGRC="/usr/share/fwts/fwts-live-dialogrc" FWTS_DATE=`date +%d%m%Y` @@ -254,12 +255,12 @@ the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\nPress Enter to continu # check_run_oem_tests() { - if [ -f /fwts/oem-tests.lst ]; then + if [ -f $OEM_TESTS_FILE ]; then cd $WORK_DIR >& /dev/null - OEM_TESTS=$(echo $(grep TESTS /fwts/oem-tests.lst) | cut -d '=' -f 2) + OEM_TESTS=$(echo $(grep TESTS $OEM_TESTS_FILE) | cut -d '=' -f 2) do_test "${OEM_TESTS}" 'Running OEM Specified Tests' fwts --dump > /dev/null - POST_ACTION=$(echo $(grep POST /fwts/oem-tests.lst) | cut -d '=' -f 2) + POST_ACTION=$(echo $(grep POST $OEM_TESTS_FILE) | cut -d '=' -f 2) if [ $POST_ACTION == "poweroff" ]; then dialog --backtitle "$FWTS" --infobox "Shutting down and powering off..." 5 80 elif [ $POST_ACTION == "reboot" ]; then