Last active
August 29, 2015 14:02
-
-
Save semipermeable/5dffc6e6275ff589a63f to your computer and use it in GitHub Desktop.
solano-runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
options = {} | |
OptionParser.new do |opts| | |
opts.banner = "Usage: #{$0} [options]" | |
opts.on("-d PREFIX", String, "Prefix") do |v| | |
options[:prefix] = v | |
end | |
end.parse! | |
classes = ARGV.map{|f| File.basename(f).split('.')[0]} | |
cmd = "(" | |
if options[:prefix] | |
cmd += "cd #{options[:prefix]} && " | |
end | |
cmd += "mvn -Dtest=#{classes.join(",")} test" | |
cmd += ")" | |
puts cmd | |
system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment