Execute SystemTap sanity check.
This commit is contained in:
parent
f9ae9cbc98
commit
e4cf284bcd
2 changed files with 14 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ Source7: config.h
|
|||
Source8: rubygems.attr
|
||||
Source9: rubygems.req
|
||||
Source10: rubygems.prov
|
||||
# SystemTap sanity test case.
|
||||
Source11: test_systemtap.rb
|
||||
|
||||
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
|
||||
# fails on older Fedoras.
|
||||
|
|
@ -570,6 +572,9 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \
|
|||
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp
|
||||
|
||||
%check
|
||||
# Sanity check that SystemTap (dtrace) was detected.
|
||||
make runruby TESTRUN_SCRIPT=%{SOURCE11} || exit 1
|
||||
|
||||
DISABLE_TESTS=""
|
||||
|
||||
%ifarch i686
|
||||
|
|
|
|||
9
test_systemtap.rb
Normal file
9
test_systemtap.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
require 'rbconfig'
|
||||
|
||||
if RbConfig::CONFIG.select {|k, v| v =~ /dtrace/}.size == 1
|
||||
exit true
|
||||
else
|
||||
puts 'ERROR: SystemTap (dtrace) support was not detected.'
|
||||
|
||||
exit false
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue