Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bin/enable-executable
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/usr/bin/env ruby

require 'fileutils'

puts 'Ensuring test files are executable...'

Dir.glob('**/*test.rb').each do |f|
(Dir.glob('**/*test.rb') + Dir.glob('bin/*')).each do |f|
if File.executable?(f)
print '.'
else
print "Adding exec bit to #{f}."
File.chmod(0744, f)
print "\nAdding exec bit to #{f}"
FileUtils.chmod('u+x', f)
end
end
puts
3 changes: 1 addition & 2 deletions bin/executable-tests-check
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env ruby
require 'minitest/autorun'

files = Dir.glob('**/*_test.rb')
files.each do |f|
(Dir.glob('**/*test.rb') + Dir.glob('bin/*')).each do |f|
describe f do
it 'should have the execution bit set' do
assert File.executable?(f), "Execution bit not set for #{f}"
Expand Down