From patchwork Mon Jun 11 12:36:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 927650 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 414CF156qWz9rvt for ; Mon, 11 Jun 2018 22:36:34 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 22DDA1B9670 for ; Mon, 11 Jun 2018 14:36:31 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 81F811B965D for ; Mon, 11 Jun 2018 14:36:29 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 5B483600A49 for ; Mon, 11 Jun 2018 14:36:28 +0200 (CEST) Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 09595AEE3 for ; Mon, 11 Jun 2018 12:36:27 +0000 (UTC) From: Cyril Hrubis To: ltp@lists.linux.it Date: Mon, 11 Jun 2018 14:36:07 +0200 Message-Id: <20180611123607.19390-1-chrubis@suse.cz> X-Mailer: git-send-email 2.13.6 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.2 required=7.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH] [RFC] README.md: Add shortcut to running a single test 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" Add a shortcut to compiling and running a single test, which is something that I've been asked for a few times. Signed-off-by: Cyril Hrubis Reviewed-by: Petr Vorel --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index ffa769d73..6c2d203b7 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,49 @@ $ git clone https://github.com/linux-test-project/ltp.git $ cd ltp $ make autotools $ ./configure +``` + +Now you can continue either with compiling and running a single test or with +compling and installing the whole testsuite. + +Shortcut to running a single test +--------------------------------- + +If you need to execute a single test you actually does not need to compile +whole LTP, if you want to run a syscall testcase following should work. + +``` +$ cd testcases/kernel/syscalls/foo +$ make +$ PATH=$PATH:$PWD ./foo01 +``` + +Shell testcases are a bit more complicated since these need a path to a shell +library as well as to compiled binary helpers, but generally following should +work. + +``` +$ cd testcases/lib +$ make +$ cd ../commands/foo +$ PATH=$PATH:$PWD:$PWD/../../lib/ ./foo01.sh +``` + +Open Posix Testsuite has it's own build system which needs Makefiles to be +generated first, then compilation should work in subdirectories as well. + +``` +$ cd testcases/open_posix_testsuite/ +$ make generate-makefiles +$ cd conformance/interfaces/foo +$ make +$ ./foo_1-1.run-test +``` + +Copiling and installing all testcases +------------------------------------- + +``` $ make $ make install ```