[LTP] [RFC PATCH 2/2] make: Add test target
Petr Vorel
pvorel@suse.cz
Fri Aug 31 14:37:03 CEST 2018
Hi Jan,
> ----- Original Message -----
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Makefile | 3 +++
> > lib/tests/Makefile | 3 +++
> > lib/tests/test.sh | 32 ++++++++++++++++++++++++++++++++
> > 3 files changed, 38 insertions(+)
> > create mode 100755 lib/tests/test.sh
> > +
> > +for i in $@; do
> > + echo "=== Testing '$i' ==="
> > + case $i in
> > + tst_checkpoint_wake_timeout|tst_record_childstatus)
> > + if [ "$i" = "tst_record_childstatus" ]; then
> > + echo "NOTE: expecting fail the test"
> > + ./$i || [ $? -eq 1 ]
> > + fi
> I'd prefer we fix the tests and make them return 0 if everything goes as expected.
Agree. But I took different folder. As Cyril pointed out, tests in lib/tests/
are for legacy API. I'm going to test new ones from lib/newlib_tests/.
As Christian works on #312 "Unit testing the shell library" [1], I'd like if
both shell and C tests had the same approach of testing.
I wonder whether to keep these tests in lib/tests/. At least some of them aren't
meant to be for unit testing (due expecting failing), nobody runs them, ...
[1] https://github.com/linux-test-project/ltp/issues/312
> Regards,
> Jan
More information about the ltp
mailing list