Module: xenomai-head
Branch: master
Commit: 01cd78e9ae280ca6c14d2301a2e9cfcb7ca3ee87
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=01cd78e9ae280ca6c14d2301a2e9cfcb7ca3ee87

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed Sep 28 00:00:53 2011 +0200

testsuite: re-add xeno-regression-test

---

 src/testsuite/regression/Makefile.am             |   14 +++
 src/testsuite/regression/Makefile.in             |   98 +++++++++++++++++++---
 src/testsuite/regression/xeno-regression-test.in |   59 +++++++++++++
 src/testsuite/xeno-test/Makefile.am              |    3 +-
 src/testsuite/xeno-test/Makefile.in              |    3 +-
 src/testsuite/xeno-test/xeno-test.in             |    8 --
 6 files changed, 160 insertions(+), 25 deletions(-)

diff --git a/src/testsuite/regression/Makefile.am 
b/src/testsuite/regression/Makefile.am
index d3526e0..0fed142 100644
--- a/src/testsuite/regression/Makefile.am
+++ b/src/testsuite/regression/Makefile.am
@@ -1 +1,15 @@
+ACLOCAL_AMFLAGS = -I m4
+
+testdir = @XENO_TEST_DIR@
+pkgdir = $(pkgdatadir)
+
+bin_SCRIPTS = xeno-regression-test
+
+xeno-regression-test: $(srcdir)/xeno-regression-test.in Makefile
+       sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@
+
 SUBDIRS = native posix native+posix
+
+EXTRA_DIST = xeno-regression-test.in
+
+CLEANFILES = xeno-regression-test
diff --git a/src/testsuite/regression/Makefile.in 
b/src/testsuite/regression/Makefile.in
index 36f09a1..9b6fe36 100644
--- a/src/testsuite/regression/Makefile.in
+++ b/src/testsuite/regression/Makefile.in
@@ -14,6 +14,7 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -51,6 +52,29 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/include/xeno_config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(bin_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -248,7 +272,13 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+testdir = @XENO_TEST_DIR@
+pkgdir = $(pkgdatadir)
+bin_SCRIPTS = xeno-regression-test
 SUBDIRS = native posix native+posix
+EXTRA_DIST = xeno-regression-test.in
+CLEANFILES = xeno-regression-test
 all: all-recursive
 
 .SUFFIXES:
@@ -282,6 +312,40 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ 
$(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit 
$$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -484,9 +548,12 @@ distdir: $(DISTFILES)
        done
 check-am: all-am
 check: check-recursive
-all-am: Makefile
+all-am: Makefile $(SCRIPTS)
 installdirs: installdirs-recursive
 installdirs-am:
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -504,6 +571,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -538,7 +606,7 @@ install-dvi: install-dvi-recursive
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-binSCRIPTS
 
 install-html: install-html-recursive
 
@@ -576,7 +644,7 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-binSCRIPTS
 
 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
        install-am install-strip tags-recursive
@@ -585,16 +653,20 @@ uninstall-am:
        all all-am check check-am clean clean-generic clean-libtool \
        ctags ctags-recursive distclean distclean-generic \
        distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-pdf install-pdf-am \
-       install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am
-
+       html-am info info-am install install-am install-binSCRIPTS \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am \
+       uninstall-binSCRIPTS
+
+
+xeno-regression-test: $(srcdir)/xeno-regression-test.in Makefile
+       sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/testsuite/regression/xeno-regression-test.in 
b/src/testsuite/regression/xeno-regression-test.in
new file mode 100644
index 0000000..211f2ec
--- /dev/null
+++ b/src/testsuite/regression/xeno-regression-test.in
@@ -0,0 +1,59 @@
+#! @testdir@/xeno-test-run
+
+usage()
+{
+    cat <<EOF
+xeno-test [ -l "load command" ] [ latency options ]
+
+Run Xenomai full testsuite on your platform, by first starting a
+few unit tests, then running the latency test under the load generated by
+"load-command".
+
+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
+
+set -ex
+
+echo 0 > /proc/xenomai/latency || :
+
+# in-tree tests
+@testdir@/arith
+@testdir@/clocktest -T 30
+@testdir@/cond-torture-native
+@testdir@/cond-torture-posix
+@testdir@/mutex-torture-native
+@testdir@/mutex-torture-posix
+
+# the tests in this tree
+@pkgdir@/posix/leaks
+@pkgdir@/posix/shm
+@pkgdir@/native/heap
+@pkgdir@/native/leaks
+@pkgdir@/native/mayday
+@pkgdir@/native/tsc
+@pkgdir@/native+posix/mq_select
+
+start_load
+
+check_alive @testdir@/switchtest ${1+"$@"}
+check_alive @testdir@/switchtest -s 1000 ${1+"$@"}
+check_alive @testdir@/latency ${1+"$@"}
+
+wait_load
diff --git a/src/testsuite/xeno-test/Makefile.am 
b/src/testsuite/xeno-test/Makefile.am
index aea6846..0a55b32 100644
--- a/src/testsuite/xeno-test/Makefile.am
+++ b/src/testsuite/xeno-test/Makefile.am
@@ -1,5 +1,4 @@
 testdir = @XENO_TEST_DIR@
-pkgdir = $(pkgdatadir)
 
 test_SCRIPTS = xeno-test-run-wrapper dohell
 test_PROGRAMS = xeno-test-run
@@ -8,7 +7,7 @@ bin_SCRIPTS = xeno-test
 xeno_test_run_CPPFLAGS = -DTESTDIR=\"$(testdir)\"
 
 xeno-test: $(srcdir)/xeno-test.in Makefile
-       sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@
+       sed "s,@testdir@,$(testdir)," $< > $@
 
 EXTRA_DIST = $(test_SCRIPTS) xeno-test.in
 
diff --git a/src/testsuite/xeno-test/Makefile.in 
b/src/testsuite/xeno-test/Makefile.in
index 9fcda0f..ca53daa 100644
--- a/src/testsuite/xeno-test/Makefile.in
+++ b/src/testsuite/xeno-test/Makefile.in
@@ -255,7 +255,6 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 testdir = @XENO_TEST_DIR@
-pkgdir = $(pkgdatadir)
 test_SCRIPTS = xeno-test-run-wrapper dohell
 bin_SCRIPTS = xeno-test
 xeno_test_run_CPPFLAGS = -DTESTDIR=\"$(testdir)\"
@@ -666,7 +665,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-testPROGRAMS \
 
 
 xeno-test: $(srcdir)/xeno-test.in Makefile
-       sed "s,@testdir@,$(testdir),;s,@pkgdir@,$(pkgdir)," $< > $@
+       sed "s,@testdir@,$(testdir)," $< > $@
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/testsuite/xeno-test/xeno-test.in 
b/src/testsuite/xeno-test/xeno-test.in
index c77878f..539c232 100644
--- a/src/testsuite/xeno-test/xeno-test.in
+++ b/src/testsuite/xeno-test/xeno-test.in
@@ -41,14 +41,6 @@ echo 0 > /proc/xenomai/latency || :
 @testdir@/mutex-torture-native
 @testdir@/mutex-torture-posix
 
-@pkgdir@/posix/leaks
-@pkgdir@/posix/shm
-@pkgdir@/native/heap
-@pkgdir@/native/leaks
-@pkgdir@/native/mayday
-@pkgdir@/native/tsc
-@pkgdir@/native+posix/mq_select
-
 start_load
 
 check_alive @testdir@/latency ${1+"$@"}


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to