Skip to content
Browse files

Add and use --agent to mspec

  • Loading branch information...
1 parent e27f185 commit 3015b8066fb7e3c826b5ada9e8941f85b4d7db85 Evan Phoenix committed Jul 27, 2010
Showing with 15 additions and 1 deletion.
  1. +1 −1 Rakefile
  2. +14 −0 mspec/lib/mspec/commands/mspec.rb
View
2 Rakefile
@@ -44,7 +44,7 @@ task :default => %w[build vm:test] do
ENV["CFLAGS"] = "-Ivm/capi"
end
- sh "bin/mspec ci --background"
+ sh "bin/mspec ci --background --agent"
end
# See vm.rake for more information
View
14 mspec/lib/mspec/commands/mspec.rb
@@ -38,17 +38,25 @@ def options(argv=ARGV)
options.on("-D", "--gdb", "Run under gdb") do
config[:use_gdb] = true
end
+
options.on("-A", "--valgrind", "Run under valgrind") do
config[:flags] << '--valgrind'
end
+
options.on("--warnings", "Don't supress warnings") do
config[:flags] << '-w'
ENV['OUTPUT_WARNINGS'] = '1'
end
+
options.on("-j", "--multi", "Run multiple (possibly parallel) subprocesses") do
config[:multi] = true
config[:options] << "-fy"
end
+
+ options.on("--agent", "Start the Rubinius agent") do
+ config[:agent] = true
+ end
+
options.version MSpec::VERSION do
if config[:command]
config[:options] << "-v"
@@ -57,6 +65,7 @@ def options(argv=ARGV)
exit
end
end
+
options.help do
if config[:command]
config[:options] << "-h"
@@ -140,6 +149,11 @@ def run
ENV['RUBY_FLAGS'] = config[:flags].join " "
argv = []
+
+ if config[:agent]
+ argv << "-Xagent.start"
+ end
+
argv.concat config[:flags]
argv.concat config[:includes]
argv.concat config[:requires]

0 comments on commit 3015b80

Please sign in to comment.
Something went wrong with that request. Please try again.