changeset 2857:86faa1802483

PR2893: test/tapset/jstaptest.pl should be executable 2016-01-29 Andrew John Hughes <gnu.andrew@member.fsf.org> PR2893: test/tapset/jstaptest.pl should be executable * Makefile.am: (check-tapset-probes): Check that Perl is available and, if so, use it to invoke the script. (check-tapset-jstack): Likewise. * NEWS: Updated. * configure.ac: Check for Perl if SystemTap is found, so the tests can be run if required.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 25 Mar 2016 03:02:15 +0000
parents 1f1d05d55b81
children 1d6fc4bd9dd4
files ChangeLog Makefile.am NEWS configure.ac
diffstat 4 files changed, 29 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 25 02:51:29 2016 +0000
+++ b/ChangeLog	Fri Mar 25 03:02:15 2016 +0000
@@ -1,3 +1,15 @@
+2016-01-29  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	PR2893: test/tapset/jstaptest.pl should be executable
+	* Makefile.am:
+	(check-tapset-probes): Check that Perl is available
+	and, if so, use it to invoke the script.
+	(check-tapset-jstack): Likewise.
+	* NEWS: Updated.
+	* configure.ac:
+	Check for Perl if SystemTap is found, so the
+	tests can be run if required.
+
 2016-03-24  Andrew John Hughes  <gnu.andrew@member.fsf.org>
 
 	PR2803: Make system CUPS optional
--- a/Makefile.am	Fri Mar 25 02:51:29 2016 +0000
+++ b/Makefile.am	Fri Mar 25 03:02:15 2016 +0000
@@ -2831,14 +2831,20 @@
 
 check-tapset-probes: 
 if ENABLE_SYSTEMTAP
-	$(abs_top_srcdir)/test/tapset/jstaptest.pl \
+	if test "x${PERL}" = "x"; then \
+	  echo "ERROR: Perl not found"; exit -1; \
+	fi
+	${PERL} $(abs_top_srcdir)/test/tapset/jstaptest.pl \
 	  -B $(BUILD_OUTPUT_DIR) -A $(BUILD_ARCH_DIR) \
 	  -S $(abs_top_srcdir)/test/tapset \
 	  -a test/check-stap.log -p
 endif
 check-tapset-jstack: 
 if ENABLE_SYSTEMTAP
-	$(abs_top_srcdir)/test/tapset/jstaptest.pl \
+	if test "x${PERL}" = "x"; then \
+	  echo "ERROR: Perl not found"; exit -1; \
+	fi
+	${PERL} $(abs_top_srcdir)/test/tapset/jstaptest.pl \
 	  -B $(BUILD_OUTPUT_DIR) -A $(BUILD_ARCH_DIR) \
 	  -S $(abs_top_srcdir)/test/tapset \
 	  -a test/check-stap.log -j
--- a/NEWS	Fri Mar 25 02:51:29 2016 +0000
+++ b/NEWS	Fri Mar 25 03:02:15 2016 +0000
@@ -16,6 +16,7 @@
 
 * Bug fixes
   - PR2803: Make system CUPS optional
+  - PR2893: test/tapset/jstaptest.pl should be executable
 * CACAO
   - PR2781, CA195: typeinfo.cpp: typeinfo_merge_nonarrays: Assertion `dest && result && x.any && y.any' failed
 
--- a/configure.ac	Fri Mar 25 02:51:29 2016 +0000
+++ b/configure.ac	Fri Mar 25 03:02:15 2016 +0000
@@ -314,6 +314,14 @@
   inst.method(24);
 ]])], [AC_MSG_RESULT([yes])], [SDT_H_FOUND='no'; AC_MSG_WARN([systemtap sdt.h or g++ too old])])
 AC_LANG_POP([C++])
+if test "x${SDT_H_FOUND}" = "xyes"; then
+ AC_PATH_TOOL([PERL],[perl])
+ if test x"${PERL}" = x ; then
+   AC_MSG_WARN([Perl not found in PATH; SystemTap tests will not be able to run])
+ fi
+ AC_SUBST(PERL)
+fi
+
 AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$SDT_H_FOUND = xyes])
 
 ABS_CLIENT_LIBJVM_SO="${prefix}/jre/lib/${INSTALL_ARCH_DIR}/client/libjvm.so"