README.md: Add shortcut to running a single test
RFC PATCH 1/1 README.md: Add shortcut to running a single test
Add a shortcut to compiling and running a single test, which is something that I've been asked for a few times.
--- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
README.md +43 -0
@@ -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 ```
Signature · 1 line
2.13.6
RFC PATCH 1/1 README.md: Add shortcut to running a single test
Hi Cyril,
Quoted 4 lines
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 <[email protected]>
Nice idea. LGTM, just 2 typos found.
Quoted 9 lines
--- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)README.md +0
-0
README.md $ git clone https://github.com/linux-test-project/ltp.git · line 48
Quoted 7 lines
README.md +4
-0@@ -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.
typo ^
compiling and installing the whole testsuite.
...
README.md $ git clone https://github.com/linux-test-project/ltp.git · line 84
Quoted 8 lines
README.md +8
-0+$ cd testcases/open_posix_testsuite/ +$ make generate-makefiles +$ cd conformance/interfaces/foo +$ make +$ ./foo_1-1.run-test +``` + +Copiling and installing all testcases
typo ^
Compiling and installing all testcases
Kind regards,
Petr
RFC PATCH 1/1 README.md: Add shortcut to running a single test
Hi!
Quoted 1 line
Nice idea. LGTM, just 2 typos found.
Pushed with typos fixed, thanks for the review.
Signature · 2 lines
Cyril Hrubis [email protected]
RFC PATCH 1/1 README.md: Add shortcut to running a single test
Hi Cyril,
Quoted 3 lines
Quoted 1 line
Nice idea. LGTM, just 2 typos found.
Pushed with typos fixed, thanks for the review.
Actually I've noticed, that some shell tests expect to have LTPROOT defined, like(move_pages.sh in testcases/kernel/syscalls/move_pages (which is going to be removed anyway).
But we should decide how to handle LTPROOT (if it's needed, we should check for it to be empty and warn).
Kind regards,
Petr