Module: xenomai-gch Branch: next Commit: 2cdfe039613800791e88c86444003109064a59d1 URL: http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=2cdfe039613800791e88c86444003109064a59d1
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Sun Dec 20 20:55:47 2015 +0100 test: re-add xeno-regression-test --- testsuite/xeno-test/Makefile.am | 7 ++- testsuite/xeno-test/xeno-regression-test.in | 66 +++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/testsuite/xeno-test/Makefile.am b/testsuite/xeno-test/Makefile.am index cd809ab..25ff305 100644 --- a/testsuite/xeno-test/Makefile.am +++ b/testsuite/xeno-test/Makefile.am @@ -3,7 +3,7 @@ pkgdir = $(pkgdatadir) test_SCRIPTS = xeno-test-run-wrapper dohell test_PROGRAMS = xeno-test-run -bin_SCRIPTS = xeno-test +bin_SCRIPTS = xeno-test xeno-regression-test xeno_test_run_CPPFLAGS = -DTESTDIR=\"$(testdir)\" -D_GNU_SOURCE xeno_test_run_LDADD = -lpthread -lrt @@ -11,6 +11,9 @@ xeno_test_run_LDADD = -lpthread -lrt xeno-test: $(srcdir)/xeno-test.in Makefile sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@ -EXTRA_DIST = $(test_SCRIPTS) xeno-test.in +xeno-regression-test: $(srcdir)/xeno-regression-test.in Makefile + sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@ + +EXTRA_DIST = $(test_SCRIPTS) xeno-test.in xeno-regression-test.in CLEANFILES = xeno-test diff --git a/testsuite/xeno-test/xeno-regression-test.in b/testsuite/xeno-test/xeno-regression-test.in new file mode 100644 index 0000000..77fde9b --- /dev/null +++ b/testsuite/xeno-test/xeno-regression-test.in @@ -0,0 +1,66 @@ +#! @testdir@/xeno-test-run + +usage() +{ + cat <<EOF +xeno-test -h or xeno-test --help + +This help text. + + +xeno-test [ -k ] [ -l "load command" ] [ -- ] [ latency test options ] + +Run a basic test/benchmark of Xenomai on your platform, by first starting a +few unit tests, then running the latency test under the load generated by +"load-command". + +This script accepts the -k option to tell the unit test loop to keep +going upon a failing test. Otherwise xeno-test stops immediately. + +By default, the load command is "dohell 900", which will generate load during +15 minutes. To generate a more realistic load see dohell help. + +Any other option passed on the command line is passed to the latency test. + +Example: +xeno-test -l "dohell -s 192.168.0.5 -m /mnt -l /ltp" -t 2 + +Will generate load including network load using the server at IP address +192.168.0.5, some I/O under the moint point /mnt, and the LTP testsuite +installed under the /ltp directory, and use the latency test by measuring the +timer irq latency. +EOF +} + +if [ "$1" = "-h" -o "$1" = "--help" ]; then + usage + exit 0 +fi + +keep_going= +if [ "$1" = "-k" ]; then + keep_going=--keep-going + shift +fi + +if [ "$1" = "--" ]; then + shift +fi + +set -ex + +echo 0 > /proc/xenomai/latency || : + +testdir=@testdir@ + +$testdir/smokey --run $keep_going +$testdir/clocktest -D -T 30 -C CLOCK_HOST_REALTIME || $testdir/clocktest -T 30 +$testdir/switchtest -T 30 + +start_load + +check_alive @testdir@/switchtest +check_alive @testdir@/switchtest -s 1000 +check_alive @testdir@/latency ${1+"$@"} + +wait_load _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git