Skip to contentSkip to conversation

consolidate testsuite installation

PATCH In review Jan Kiszka 3 participants 16 messages Dec 10, 2006 – Dec 18, 2006

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 consolidate testsuite installation

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

My suggestion, realised by this patch, is to push run scripts and .runinfo files to $prefix/share/xenomai/testsuite/<test>/ while installing the binaries now also to $prefix/bin. This allows both the invocation and cleanup via run scripts (i.e. xeno-load) and the simple direct call of the tests if all required modules are already loaded. Additionally, the patch also enables run script invocation without prior cd to the containing directory.

Unless no objections arise, I would like to have this in upcoming 2.3 already (can make life of package builders easier).

Jan

testsuite/latency/runinfo +1 -1
Index: src/testsuite/latency/runinfo
===================================================================
@@ -1 +1 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
+latency:native+rtdm+timerbench:!latency;popall:control_c
testsuite/latency/Makefile.am +3 -3
Index: src/testsuite/latency/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/latency
+testdir = $(pkgdatadir)/testsuite/latency
 
-test_PROGRAMS = latency
+bin_PROGRAMS = latency
 
 latency_SOURCES = latency.c
 
@@ -18,7 +18,7 @@ latency_LDADD = \
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
 	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchbench/runinfo +1 -1
Index: src/testsuite/switchbench/runinfo
===================================================================
@@ -1 +1 @@
-switchbench:native:!./switchbench;popall:control_c
+switchbench:native:!switchbench;popall:control_c
testsuite/switchbench/Makefile.am +3 -3
Index: src/testsuite/switchbench/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchbench
+testdir = $(pkgdatadir)/testsuite/switchbench
 
-test_PROGRAMS = switchbench
+bin_PROGRAMS = switchbench
 
 switchbench_SOURCES = switchbench.c
 
@@ -17,7 +17,7 @@ switchbench_LDADD = \
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
 	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchtest/runinfo +1 -1
Index: src/testsuite/switchtest/runinfo
===================================================================
@@ -1 +1 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
+switchtest:posix+rtdm+switchtest:!switchtest;popall:control_c
testsuite/switchtest/Makefile.am +3 -3
Index: src/testsuite/switchtest/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchtest
+testdir = $(pkgdatadir)/testsuite/switchtest
 
-test_PROGRAMS = switchtest
+bin_PROGRAMS = switchtest
 
 switchtest_SOURCES = switchtest.c
 
@@ -14,7 +14,7 @@ switchtest_LDADD = \
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
 	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/cyclic/runinfo +1 -1
Index: src/testsuite/cyclic/runinfo
===================================================================
@@ -1 +1 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
+cyclictest:posix:!cyclictest -p 99 -n;popall:control_c
testsuite/cyclic/Makefile.am +3 -3
Index: src/testsuite/cyclic/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/cyclic
+testdir = $(pkgdatadir)/testsuite/cyclic
 
-test_PROGRAMS = cyclictest
+bin_PROGRAMS = cyclictest
 
 cyclictest_SOURCES = cyclictest.c
 
@@ -14,7 +14,7 @@ cyclictest_LDADD = \
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
 	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/irqbench/runinfo +1 -1
Index: src/testsuite/irqbench/runinfo
===================================================================
@@ -1 +1 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
+irqloop:posix+rtdm+irqbench:!irqloop;popall:control_c
testsuite/irqbench/Makefile.am +4 -4
Index: src/testsuite/irqbench/Makefile.am
===================================================================
@@ -1,9 +1,9 @@
-testdir = $(exec_prefix)/testsuite/irqbench
+testdir = $(pkgdatadir)/testsuite/irqbench
 
-test_PROGRAMS = irqloop
+bin_PROGRAMS = irqloop
 
 if XENO_TARGET_ARCH_I386
-test_PROGRAMS += irqbench
+bin_PROGRAMS += irqbench
 endif
 
 
@@ -34,7 +34,7 @@ irqbench_LDFLAGS = $(XENO_USER_LDFLAGS)
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
 	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
xeno-load.in +2 -2
Index: scripts/xeno-load.in
===================================================================
@@ -236,9 +236,9 @@ while test -n "$target_info" ; do
 	set -- $e
 	test $verbose = 1 && echo "+ spawning command ($* $cmdargs)"
 	if test $waitflag = 1; then
-           $suflag $* $cmdargs
+           PATH=$PATH:$exec_prefix/bin $suflag $* $cmdargs
         else
-           $suflag $* $cmdargs &
+           PATH=$PATH:$exec_prefix/bin $suflag $* $cmdargs &
 	   children_pids="$! $children_pids"
 	fi
 	;;
xeno-test.in +8 -5
Index: scripts/xeno-test.in
===================================================================
@@ -4,6 +4,9 @@
 # If you want to test it this way, do: sh xeno-test
 # BusyBox >= 1.1.3 with a make defconfig should provide all needed applets.
 
+prefix="@prefix@"
+pkgdatadir="@[email protected]"
+
 myusage() {
     cat >&1 <<EOF
 xeno-test [options]
@@ -195,24 +198,24 @@ run_w_load() {
     loudly generate_loads $workload
     boxstatus
     (
-        cd `dirname $0`/../testsuite/latency
+        cd $pkgdatadir/testsuite/latency
 	loudly ./run -- $XENOT_LATENCY $opts -t0 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t1 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t2 '# latency'
     )
-    (	cd `dirname $0`/../testsuite/switchtest
+    (	cd $pkgdatadir/testsuite/switchtest
 	loudly ./run -- -T 120 $XENOT_SWITCHTEST '# switchtest'
     )
-    (	cd `dirname $0`/../testsuite/switchbench
+    (	cd $pkgdatadir/testsuite/switchbench
 	loudly ./run -- -h $XENOT_SWITCHBENCH '# switchbench'
     )
-    (	cd `dirname $0`/../testsuite/cyclic
+    (	cd $pkgdatadir/testsuite/cyclic
 	loudly ./run -- -p 10 -n -l 1000 $XENOT_CYCLIC '# cyclictest'
     )
 
     if [ "$XENOT_IRQBENCH" != "" ] ; then
 	(
-	    cd `dirname $0`/../testsuite/irqbench
+	    cd $pkgdatadir/testsuite/irqbench
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t0 '# irqbench user'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t1 '# irqbench kernel'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t2 '# irqbench irq-handler'
#1 lore raw
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

xeno-load.in +1 -1
@@ -37,7 +37,7 @@
      target_dir=`pwd`
   fi
   if test "x$target_name" = x; then
-     if `echo $target_dir | grep -q /`; then
+     if `echo $target_dir | grep -q -e / -e .`; then
         target_name=default
      else
         target_name=$target_dir
testsuite/latency/runinfo +1 -1
Index: src/testsuite/latency/runinfo
===================================================================
@@ -1 +1 @@
-latency:native+rtdm+timerbench:!latency;popall:control_c
+latency:native+rtdm+timerbench:!../../../../bin/latency;popall:control_c
Signature · 1 line
Philippe.
author
#2 lore raw
Quoted 11 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 12 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Relative paths are not fully safe, so here comes a full-blown approach based on sed-on-install.

Jan

 scripts/xeno-test.in                  |   13 ++++++++-----
 src/testsuite/cyclic/Makefile.am      |    8 ++++----
 src/testsuite/cyclic/runinfo          |    1 -
 src/testsuite/cyclic/runinfo.in       |    2 +-
 src/testsuite/irqbench/Makefile.am    |   10 +++++-----
 src/testsuite/irqbench/runinfo        |    1 -
 src/testsuite/irqbench/runinfo.in     |    2 +-
 src/testsuite/latency/Makefile.am     |    8 ++++----
 src/testsuite/latency/runinfo         |    1 -
 src/testsuite/latency/runinfo.in      |    2 +-
 src/testsuite/switchbench/Makefile.am |    8 ++++----
 src/testsuite/switchbench/runinfo     |    1 -
 src/testsuite/switchbench/runinfo.in  |    2 +-
 src/testsuite/switchtest/Makefile.am  |    8 ++++----
 src/testsuite/switchtest/runinfo      |    1 -
 src/testsuite/switchtest/runinfo.in   |    2 +-
 16 files changed, 34 insertions(+), 36 deletions(-)
testsuite/latency/runinfo +0 -1
Index: src/testsuite/latency/runinfo
===================================================================
@@ -1 +0,0 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
testsuite/latency/runinfo.in +1 -1
Index: src/testsuite/latency/runinfo.in
===================================================================
@@ -1 +1 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
+latency:native+rtdm+timerbench:!@[email protected]_c
testsuite/latency/Makefile.am +4 -4
Index: src/testsuite/latency/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/latency
+testdir = $(pkgdatadir)/testsuite/latency
 
-test_PROGRAMS = latency
+bin_PROGRAMS = latency
 
 latency_SOURCES = latency.c
 
@@ -17,8 +17,8 @@ latency_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchbench/runinfo +0 -1
Index: src/testsuite/switchbench/runinfo
===================================================================
@@ -1 +0,0 @@
-switchbench:native:!./switchbench;popall:control_c
testsuite/switchbench/runinfo.in +1 -1
Index: src/testsuite/switchbench/runinfo.in
===================================================================
@@ -1 +1 @@
-switchbench:native:!./switchbench;popall:control_c
+switchbench:native:!@[email protected]
testsuite/switchbench/Makefile.am +4 -4
Index: src/testsuite/switchbench/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchbench
+testdir = $(pkgdatadir)/testsuite/switchbench
 
-test_PROGRAMS = switchbench
+bin_PROGRAMS = switchbench
 
 switchbench_SOURCES = switchbench.c
 
@@ -16,8 +16,8 @@ switchbench_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchtest/runinfo +0 -1
Index: src/testsuite/switchtest/runinfo
===================================================================
@@ -1 +0,0 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
testsuite/switchtest/runinfo.in +1 -1
Index: src/testsuite/switchtest/runinfo.in
===================================================================
@@ -1 +1 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
+switchtest:posix+rtdm+switchtest:!@[email protected]_c
testsuite/switchtest/Makefile.am +4 -4
Index: src/testsuite/switchtest/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchtest
+testdir = $(pkgdatadir)/testsuite/switchtest
 
-test_PROGRAMS = switchtest
+bin_PROGRAMS = switchtest
 
 switchtest_SOURCES = switchtest.c
 
@@ -13,8 +13,8 @@ switchtest_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/cyclic/runinfo +0 -1
Index: src/testsuite/cyclic/runinfo
===================================================================
@@ -1 +0,0 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
testsuite/cyclic/runinfo.in +1 -1
Index: src/testsuite/cyclic/runinfo.in
===================================================================
@@ -1 +1 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
+cyclictest:posix:!@[email protected] -p 99 -n;popall:control_c
testsuite/cyclic/Makefile.am +4 -4
Index: src/testsuite/cyclic/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/cyclic
+testdir = $(pkgdatadir)/testsuite/cyclic
 
-test_PROGRAMS = cyclictest
+bin_PROGRAMS = cyclictest
 
 cyclictest_SOURCES = cyclictest.c
 
@@ -13,8 +13,8 @@ cyclictest_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/irqbench/runinfo +0 -1
Index: src/testsuite/irqbench/runinfo
===================================================================
@@ -1 +0,0 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
testsuite/irqbench/runinfo.in +1 -1
Index: src/testsuite/irqbench/runinfo.in
===================================================================
@@ -1 +1 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
+irqloop:posix+rtdm+irqbench:!@[email protected]
testsuite/irqbench/Makefile.am +5 -5
Index: src/testsuite/irqbench/Makefile.am
===================================================================
@@ -1,9 +1,9 @@
-testdir = $(exec_prefix)/testsuite/irqbench
+testdir = $(pkgdatadir)/testsuite/irqbench
 
-test_PROGRAMS = irqloop
+bin_PROGRAMS = irqloop
 
 if XENO_TARGET_ARCH_I386
-test_PROGRAMS += irqbench
+bin_PROGRAMS += irqbench
 endif
 
 
@@ -33,8 +33,8 @@ irqbench_LDFLAGS = $(XENO_USER_LDFLAGS)
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
xeno-test.in +8 -5
Index: scripts/xeno-test.in
===================================================================
@@ -4,6 +4,9 @@
 # If you want to test it this way, do: sh xeno-test
 # BusyBox >= 1.1.3 with a make defconfig should provide all needed applets.
 
+prefix="@prefix@"
+pkgdatadir="@[email protected]"
+
 myusage() {
     cat >&1 <<EOF
 xeno-test [options]
@@ -195,24 +198,24 @@ run_w_load() {
     loudly generate_loads $workload
     boxstatus
     (
-        cd `dirname $0`/../testsuite/latency
+        cd $pkgdatadir/testsuite/latency
 	loudly ./run -- $XENOT_LATENCY $opts -t0 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t1 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t2 '# latency'
     )
-    (	cd `dirname $0`/../testsuite/switchtest
+    (	cd $pkgdatadir/testsuite/switchtest
 	loudly ./run -- -T 120 $XENOT_SWITCHTEST '# switchtest'
     )
-    (	cd `dirname $0`/../testsuite/switchbench
+    (	cd $pkgdatadir/testsuite/switchbench
 	loudly ./run -- -h $XENOT_SWITCHBENCH '# switchbench'
     )
-    (	cd `dirname $0`/../testsuite/cyclic
+    (	cd $pkgdatadir/testsuite/cyclic
 	loudly ./run -- -p 10 -n -l 1000 $XENOT_CYCLIC '# cyclictest'
     )
 
     if [ "$XENOT_IRQBENCH" != "" ] ; then
 	(
-	    cd `dirname $0`/../testsuite/irqbench
+	    cd $pkgdatadir/testsuite/irqbench
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t0 '# irqbench user'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t1 '# irqbench kernel'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t2 '# irqbench irq-handler'
#3 lore raw
Quoted 28 lines · Jan Kiszka
Quoted 11 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 12 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Quoted 1 line

Relative paths are not fully safe,

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Signature · 1 line
Philippe.
author
#4 lore raw
Quoted 25 lines · Philippe Gerum
Quoted 24 lines · Jan Kiszka
Quoted 10 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Quoted 5 lines
Quoted 1 line

Relative paths are not fully safe,

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

#5 lore raw
Quoted 28 lines · Jan Kiszka
Quoted 27 lines · Philippe Gerum
Quoted 25 lines · Jan Kiszka
Quoted 10 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Relative paths are not fully safe,

Quoted 8 lines
Quoted 3 lines

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

Ack.

Signature · 1 line
Philippe.
#6 lore raw
In reply to Jan Kiszka
Quoted 36 lines · Jan Kiszka
Quoted 34 lines · Philippe Gerum
Quoted 31 lines · Jan Kiszka
Quoted 7 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Quoted 5 lines

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Relative paths are not fully safe,

Quoted 8 lines
Quoted 3 lines

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

Since the testsuite scripts are supposed to be run on the target, I think they should be installed under exec_prefix.

Signature · 1 line
                                                 Gilles Chanteperdrix
author
#7 lore raw
Quoted 37 lines · Gilles Chanteperdrix
Quoted 36 lines · Jan Kiszka
Quoted 33 lines · Philippe Gerum
Quoted 27 lines · Jan Kiszka
Quoted 11 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Quoted 1 line

Relative paths are not fully safe,

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Quoted 7 lines
Quoted 3 lines

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

Since the testsuite scripts are supposed to be run on the target, I think they should be installed under exec_prefix.

I didn't come across some scenario yet where I had to split exec_prefix from prefix. So I followed this definition:

"Generally, $(exec_prefix) is used for directories that contain machine-specific files (such as executables and subroutine libraries), while $(prefix) is used directly for other directories."

As the scripts just like the .runinfos are certainly machine-independent, my feeling is that prefix is the right thing.

Jan

#8 lore raw
Quoted 61 lines · Jan Kiszka
Quoted 47 lines · Gilles Chanteperdrix
Quoted 45 lines · Jan Kiszka
Quoted 41 lines · Philippe Gerum
Quoted 33 lines · Jan Kiszka
Quoted 8 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Quoted 5 lines

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Quoted 1 line

Relative paths are not fully safe,

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Quoted 7 lines
Quoted 3 lines

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

Since the testsuite scripts are supposed to be run on the target, I think they should be installed under exec_prefix.

I didn't come across some scenario yet where I had to split exec_prefix from prefix. So I followed this definition:

Quoted 6 lines

"Generally, $(exec_prefix) is used for directories that contain machine-specific files (such as executables and subroutine libraries), while $(prefix) is used directly for other directories."

As the scripts just like the .runinfos are certainly machine-independent, my feeling is that prefix is the right thing.

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

Signature · 1 line
                                                 Gilles Chanteperdrix
author
#9 lore raw
Quoted 62 lines · Gilles Chanteperdrix
Quoted 54 lines · Jan Kiszka
Quoted 39 lines · Gilles Chanteperdrix
Quoted 37 lines · Jan Kiszka
Quoted 34 lines · Philippe Gerum
Quoted 31 lines · Jan Kiszka
Quoted 7 lines · Philippe Gerum
Quoted 4 lines · Jan Kiszka

The only part of the Xenomai user-space package not yet following standard installation rules is the testsuite. It gets installed to $prefix/testsuite, by default /usr/testsuite. The attached patch is an approach to overcome this unusual layout.

Quoted 5 lines

Ack. Implementation-wise, we have to fix the following though:

xeno-load.in needs to be fixed, so that passing a single dot as argument correctly picks the default runinfo target in the current directory. This currently does not work as expected.

[obviously now fixed in svn]

Quoted 11 lines

The second patch works around a problem with sudo relying on the contents of the user's PATH variable. This won't work for people using a version of sudo compiled with the secure path option by their favourite distro. In that case, /usr/xenomai/bin (or whatever the user picked to install xenomai) won't appear in that secure path, so the binary program given in the runinfo file won't be found. A possible option is to provide a relative path to locate the binary program,
e.g. ../../../../bin/latency for the latency test, as the example patch shows. Not pretty, but the other way would need to autoconfiscate the runinfo files, or at least run them through sed before installing, so that we could substitute some placeholder with $exec_prefix.

Relative paths are not fully safe,

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Why, provided the sudo sub-shell in xeno-load changes dir to the target_dir variable contents?

Because exec_prefix (=>bindir) may be different from prefix (=>pkgdatadir), thus there is no fixed relation between the .runinfo location and the binaries until after the installation.

Since the testsuite scripts are supposed to be run on the target, I think they should be installed under exec_prefix.

I didn't come across some scenario yet where I had to split exec_prefix from prefix. So I followed this definition:

Quoted 6 lines

"Generally, $(exec_prefix) is used for directories that contain machine-specific files (such as executables and subroutine libraries), while $(prefix) is used directly for other directories."

As the scripts just like the .runinfos are certainly machine-independent, my feeling is that prefix is the right thing.

Quoted 8 lines

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

OK, appears reasonable, though I cannot asses if it's a standard usage.

What do you suggest as a replacement for $(pkgdatadir) then? $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?

Jan

#10 lore raw
Quoted 4 lines · Jan Kiszka
Quoted 3 lines · Gilles Chanteperdrix

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

Quoted 8 lines
Quoted 5 lines

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

OK, appears reasonable, though I cannot asses if it's a standard usage.

Do not know either if it is standard, but it may be useful to some users.

Quoted 3 lines

What do you suggest as a replacement for $(pkgdatadir) then? $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?

I am Ok with anything under $(exec_prefix)...

Signature · 1 line
                                                 Gilles Chanteperdrix
author
#11 lore raw
Quoted 11 lines · Gilles Chanteperdrix
Quoted 10 lines · Jan Kiszka
Quoted 8 lines · Gilles Chanteperdrix

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

Quoted 9 lines
Quoted 1 line

OK, appears reasonable, though I cannot asses if it's a standard usage.

Do not know either if it is standard, but it may be useful to some users.

Quoted 2 lines

What do you suggest as a replacement for $(pkgdatadir) then? $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?

I am Ok with anything under $(exec_prefix)...

Then you should like -v3: now exec_prefix-based.

Jan

 scripts/xeno-test.in                  |   13 ++++++++-----
 src/testsuite/cyclic/Makefile.am      |    8 ++++----
 src/testsuite/cyclic/runinfo          |    1 -
 src/testsuite/cyclic/runinfo.in       |    2 +-
 src/testsuite/irqbench/Makefile.am    |   10 +++++-----
 src/testsuite/irqbench/runinfo        |    1 -
 src/testsuite/irqbench/runinfo.in     |    2 +-
 src/testsuite/latency/Makefile.am     |    8 ++++----
 src/testsuite/latency/runinfo         |    1 -
 src/testsuite/latency/runinfo.in      |    2 +-
 src/testsuite/switchbench/Makefile.am |    8 ++++----
 src/testsuite/switchbench/runinfo     |    1 -
 src/testsuite/switchbench/runinfo.in  |    2 +-
 src/testsuite/switchtest/Makefile.am  |    8 ++++----
 src/testsuite/switchtest/runinfo      |    1 -
 src/testsuite/switchtest/runinfo.in   |    2 +-
 16 files changed, 34 insertions(+), 36 deletions(-)
testsuite/latency/runinfo +0 -1
Index: src/testsuite/latency/runinfo
===================================================================
@@ -1 +0,0 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
testsuite/latency/runinfo.in +1 -1
Index: src/testsuite/latency/runinfo.in
===================================================================
@@ -1 +1 @@
-latency:native+rtdm+timerbench:!./latency;popall:control_c
+latency:native+rtdm+timerbench:!@[email protected]_c
testsuite/latency/Makefile.am +4 -4
Index: src/testsuite/latency/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/latency
+testdir = $(exec_prefix)/share/xenomai/testsuite/latency
 
-test_PROGRAMS = latency
+bin_PROGRAMS = latency
 
 latency_SOURCES = latency.c
 
@@ -17,8 +17,8 @@ latency_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchbench/runinfo +0 -1
Index: src/testsuite/switchbench/runinfo
===================================================================
@@ -1 +0,0 @@
-switchbench:native:!./switchbench;popall:control_c
testsuite/switchbench/runinfo.in +1 -1
Index: src/testsuite/switchbench/runinfo.in
===================================================================
@@ -1 +1 @@
-switchbench:native:!./switchbench;popall:control_c
+switchbench:native:!@[email protected]
testsuite/switchbench/Makefile.am +4 -4
Index: src/testsuite/switchbench/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchbench
+testdir = $(exec_prefix)/share/xenomai/testsuite/switchbench
 
-test_PROGRAMS = switchbench
+bin_PROGRAMS = switchbench
 
 switchbench_SOURCES = switchbench.c
 
@@ -16,8 +16,8 @@ switchbench_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/switchtest/runinfo +0 -1
Index: src/testsuite/switchtest/runinfo
===================================================================
@@ -1 +0,0 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
testsuite/switchtest/runinfo.in +1 -1
Index: src/testsuite/switchtest/runinfo.in
===================================================================
@@ -1 +1 @@
-switchtest:posix+rtdm+switchtest:!./switchtest;popall:control_c
+switchtest:posix+rtdm+switchtest:!@[email protected]_c
testsuite/switchtest/Makefile.am +4 -4
Index: src/testsuite/switchtest/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/switchtest
+testdir = $(exec_prefix)/share/xenomai/testsuite/switchtest
 
-test_PROGRAMS = switchtest
+bin_PROGRAMS = switchtest
 
 switchtest_SOURCES = switchtest.c
 
@@ -13,8 +13,8 @@ switchtest_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/cyclic/runinfo +0 -1
Index: src/testsuite/cyclic/runinfo
===================================================================
@@ -1 +0,0 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
testsuite/cyclic/runinfo.in +1 -1
Index: src/testsuite/cyclic/runinfo.in
===================================================================
@@ -1 +1 @@
-cyclictest:posix:!./cyclictest -p 99 -n;popall:control_c
+cyclictest:posix:!@[email protected] -p 99 -n;popall:control_c
testsuite/cyclic/Makefile.am +4 -4
Index: src/testsuite/cyclic/Makefile.am
===================================================================
@@ -1,6 +1,6 @@
-testdir = $(exec_prefix)/testsuite/cyclic
+testdir = $(exec_prefix)/share/xenomai/testsuite/cyclic
 
-test_PROGRAMS = cyclictest
+bin_PROGRAMS = cyclictest
 
 cyclictest_SOURCES = cyclictest.c
 
@@ -13,8 +13,8 @@ cyclictest_LDADD = \
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
testsuite/irqbench/runinfo +0 -1
Index: src/testsuite/irqbench/runinfo
===================================================================
@@ -1 +0,0 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
testsuite/irqbench/runinfo.in +1 -1
Index: src/testsuite/irqbench/runinfo.in
===================================================================
@@ -1 +1 @@
-irqloop:posix+rtdm+irqbench:!./irqloop;popall:control_c
+irqloop:posix+rtdm+irqbench:!@[email protected]
testsuite/irqbench/Makefile.am +5 -5
Index: src/testsuite/irqbench/Makefile.am
===================================================================
@@ -1,9 +1,9 @@
-testdir = $(exec_prefix)/testsuite/irqbench
+testdir = $(exec_prefix)/share/xenomai/testsuite/irqbench
 
-test_PROGRAMS = irqloop
+bin_PROGRAMS = irqloop
 
 if XENO_TARGET_ARCH_I386
-test_PROGRAMS += irqbench
+bin_PROGRAMS += irqbench
 endif
 
 
@@ -33,8 +33,8 @@ irqbench_LDFLAGS = $(XENO_USER_LDFLAGS)
 
 install-data-local:
 	$(mkinstalldirs) $(DESTDIR)$(testdir)
-	$(INSTALL_DATA) $(srcdir)/runinfo $(DESTDIR)$(testdir)/.runinfo
-	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \$$*" > $(DESTDIR)$(testdir)/run
+	@sed -e's,@exec_prefix\@,$(exec_prefix),g' $(srcdir)/runinfo.in > $(DESTDIR)$(testdir)/.runinfo
+	@echo "\$${DESTDIR}$(exec_prefix)/bin/xeno-load \`dirname \$$0\` \$$*" > $(DESTDIR)$(testdir)/run
 	@chmod +x $(DESTDIR)$(testdir)/run
 
 uninstall-local:
xeno-test.in +8 -5
Index: scripts/xeno-test.in
===================================================================
@@ -4,6 +4,9 @@
 # If you want to test it this way, do: sh xeno-test
 # BusyBox >= 1.1.3 with a make defconfig should provide all needed applets.
 
+prefix="@prefix@"
+pkgdatadir="@[email protected]"
+
 myusage() {
     cat >&1 <<EOF
 xeno-test [options]
@@ -195,24 +198,24 @@ run_w_load() {
     loudly generate_loads $workload
     boxstatus
     (
-        cd `dirname $0`/../testsuite/latency
+        cd $pkgdatadir/testsuite/latency
 	loudly ./run -- $XENOT_LATENCY $opts -t0 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t1 '# latency'
 	loudly ./run -- $XENOT_LATENCY $opts -t2 '# latency'
     )
-    (	cd `dirname $0`/../testsuite/switchtest
+    (	cd $pkgdatadir/testsuite/switchtest
 	loudly ./run -- -T 120 $XENOT_SWITCHTEST '# switchtest'
     )
-    (	cd `dirname $0`/../testsuite/switchbench
+    (	cd $pkgdatadir/testsuite/switchbench
 	loudly ./run -- -h $XENOT_SWITCHBENCH '# switchbench'
     )
-    (	cd `dirname $0`/../testsuite/cyclic
+    (	cd $pkgdatadir/testsuite/cyclic
 	loudly ./run -- -p 10 -n -l 1000 $XENOT_CYCLIC '# cyclictest'
     )
 
     if [ "$XENOT_IRQBENCH" != "" ] ; then
 	(
-	    cd `dirname $0`/../testsuite/irqbench
+	    cd $pkgdatadir/testsuite/irqbench
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t0 '# irqbench user'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t1 '# irqbench kernel'
 	    loudly ./run -- -P 10 $XENOT_IRQBENCH -t2 '# irqbench irq-handler'
#12 lore raw
Quoted 20 lines · Jan Kiszka
Quoted 18 lines · Gilles Chanteperdrix
Quoted 5 lines · Jan Kiszka
Quoted 3 lines · Gilles Chanteperdrix

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

Quoted 7 lines
Quoted 5 lines

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

OK, appears reasonable, though I cannot asses if it's a standard usage.

Do not know either if it is standard, but it may be useful to some users.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

What do you suggest as a replacement for $(pkgdatadir) then? $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?

I am Ok with anything under $(exec_prefix)...

Then you should like -v3: now exec_prefix-based.

It is Ok for me.

Signature · 1 line
                                                 Gilles Chanteperdrix
author
#13 lore raw
Quoted 19 lines · Gilles Chanteperdrix
Quoted 18 lines · Jan Kiszka
Quoted 16 lines · Gilles Chanteperdrix
Quoted 11 lines · Jan Kiszka
Quoted 8 lines · Gilles Chanteperdrix

At some point in time:
https://mail.gna.org/public/xenomai-help/2006-09/msg00181.html

I started to use exec_prefix and prefix for separating the binaries, libraries and script that need to be installed on the target from the include files, documentation and xeno-config script that need to be installed on the host.

OK, appears reasonable, though I cannot asses if it's a standard usage.

Do not know either if it is standard, but it may be useful to some users.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

What do you suggest as a replacement for $(pkgdatadir) then? $(exec_prefix)/share/xenomai? Or where to put the testsuite start scripts?

I am Ok with anything under $(exec_prefix)...

Then you should like -v3: now exec_prefix-based.

It is Ok for me.

I would apply now, but all my autotool versions I have around seem to be different from yours. Should I just check-in the source part and leave the bootstrap run pending until anyone of you can kick it?

#14 lore raw
Quoted 3 lines · Jan Kiszka

I would apply now, but all my autotool versions I have around seem to be different from yours. Should I just check-in the source part and leave the bootstrap run pending until anyone of you can kick it?

You can commit the changes, I will run the auto-tools once it is done. I am not sure I have the proper versions of the autotools either, but any reasonably recent version should be Ok anyway.

Signature · 1 line
                                                 Gilles Chanteperdrix
author
#15 lore raw
Quoted 9 lines · Gilles Chanteperdrix
Quoted 3 lines · Jan Kiszka

I would apply now, but all my autotool versions I have around seem to be different from yours. Should I just check-in the source part and leave the bootstrap run pending until anyone of you can kick it?

You can commit the changes, I will run the auto-tools once it is done. I am not sure I have the proper versions of the autotools either, but any reasonably recent version should be Ok anyway.

Done. Also the dist-fix for scripts/help_from_kconfig.pl was applied.