summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2011-01-02 22:15:30 +0100
committerFlorian Frank <flori@ping.de>2011-01-02 22:25:32 +0100
commita3a4c82b577ea44cbebe7c07a4b08b1d0079bd61 (patch)
tree0446107759fc24b32eb0727da2d5fa34ed778409 /Rakefile
parent7d20dd9bce9f333c451d074cc0d2ac90560399e0 (diff)
downloadjson-a3a4c82b577ea44cbebe7c07a4b08b1d0079bd61.tar.gz
fixed test setup
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile32
1 files changed, 15 insertions, 17 deletions
diff --git a/Rakefile b/Rakefile
index 09e9110..6cd0b12 100644
--- a/Rakefile
+++ b/Rakefile
@@ -101,7 +101,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask)
s.extra_rdoc_files << 'README'
s.rdoc_options <<
'--title' << 'JSON implemention for ruby' << '--main' << 'README'
- s.test_files.concat Dir['tests/*.rb']
+ s.test_files.concat Dir['./tests/test_*.rb']
s.author = "Florian Frank"
s.email = "flori@ping.de"
@@ -138,7 +138,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
s.extra_rdoc_files << 'README'
s.rdoc_options <<
'--title' << 'JSON implemention for Ruby' << '--main' << 'README'
- s.test_files.concat Dir['tests/*.rb']
+ s.test_files.concat Dir['./tests/test_*.rb']
s.author = "Florian Frank"
s.email = "flori@ping.de"
@@ -187,6 +187,17 @@ EOT
end
end
+desc "Testing library (pure ruby)"
+task :test_pure => :clean do
+ ENV['JSON'] = 'pure'
+ ENV['RUBYOPT'] = "-Ilib #{ENV['RUBYOPT']}"
+ myruby '-S', 'testrb', *Dir['./tests/test_*.rb']
+end
+
+desc "Testing library (pure ruby and extension)"
+task :test => [ :test_pure, :test_ext ]
+
+
if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
file JAVA_PARSER_SRC => JAVA_RAGEL_PATH do
cd JAVA_DIR do
@@ -233,7 +244,7 @@ if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
desc "Testing library (jruby)"
task :test_ext => :create_jar do
ENV['JSON'] = 'ext'
- myruby '-S', 'testrb', '-Ilib', *Dir['tests/*.rb']
+ myruby '-S', 'testrb', '-Ilib', *Dir['./tests/test_*.rb']
end
file JRUBY_PARSER_JAR => :compile_ext do
@@ -277,9 +288,6 @@ if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
desc "Build all gems and archives for a new release of the jruby extension."
task :release => [ :clean, :version, :jruby_gem ]
-
- desc "Testing library (jruby extension)"
- task :test => :test_ext
else
desc "Compiling extension"
task :compile_ext => [ EXT_PARSER_DL, EXT_GENERATOR_DL ]
@@ -304,7 +312,7 @@ else
task :test_ext => :compile_ext do
ENV['JSON'] = 'ext'
ENV['RUBYOPT'] = "-Iext:lib #{ENV['RUBYOPT']}"
- myruby '-S', 'testrb', *Dir['./tests/*.rb']
+ myruby '-S', 'testrb', *Dir['./tests/test_*.rb']
end
desc "Benchmarking parser"
@@ -378,16 +386,6 @@ else
desc "Generate diagrams of ragel parser"
task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ]
- desc "Testing library (pure ruby)"
- task :test_pure => :clean do
- ENV['JSON'] = 'pure'
- ENV['RUBYOPT'] = "-Ilib #{ENV['RUBYOPT']}"
- myruby '-S', 'testrb', *Dir['tests/*.rb']
- end
-
- desc "Testing library (pure ruby and extension)"
- task :test => [ :test_pure, :test_ext ]
-
desc "Build all gems and archives for a new release of json and json_pure."
task :release => [ :clean, :version, :cross, :native, :gem, ] do
sh "#$0 clean native gem"