[LTP] [PATCH] [RFC] README.md: Add shortcut to running a single test
Cyril Hrubis
chrubis@suse.cz
Mon Jun 11 14:36:07 CEST 2018
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 <chrubis@suse.cz>
---
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
```
--
2.13.6
More information about the ltp
mailing list