From patchwork Tue Jul 3 07:42:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 938477 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Kbgv4VmSz9s1B for ; Tue, 3 Jul 2018 17:42:51 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 698613E7121 for ; Tue, 3 Jul 2018 09:42:48 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) by picard.linux.it (Postfix) with ESMTP id 037173E7045 for ; Tue, 3 Jul 2018 09:42:47 +0200 (CEST) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 78FA81000947 for ; Tue, 3 Jul 2018 09:42:46 +0200 (CEST) Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A1F08AE1D; Tue, 3 Jul 2018 07:42:45 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 3 Jul 2018 09:42:02 +0200 Message-Id: <20180703074209.911-3-pvorel@suse.cz> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180703074209.911-1-pvorel@suse.cz> References: <20180703074209.911-1-pvorel@suse.cz> X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH v3 2/9] tst_test.sh: Introduce TST_LIB_LOADED X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" to load the library only once. Signed-off-by: Petr Vorel Suggested-by: Cyril Hrubis Acked-by: Cyril Hrubis --- testcases/lib/tst_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index 73c238ab4..c2460762d 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -21,6 +21,8 @@ # This is a LTP test library for shell. # +[ -n "$TST_LIB_LOADED" ] && return 0 + export TST_PASS=0 export TST_FAIL=0 export TST_BROK=0 @@ -29,6 +31,7 @@ export TST_CONF=0 export TST_COUNT=1 export TST_ITERATIONS=1 export TST_TMPDIR_RHOST=0 +export TST_LIB_LOADED=1 . tst_ansi_color.sh