Browse files

Fixed regression tests

  • Loading branch information...
1 parent e08c29b commit 6b954559fe709a65275859a90258c636f72d7b15 @pjotrp committed Nov 27, 2011
View
1 Gemfile
@@ -8,6 +8,7 @@ gem "bio-logger", "> 0.8.0"
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
+ gem "rake", ">= 0.9.2"
gem "shoulda", ">= 0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.5.2"
View
1 Gemfile.lock
@@ -32,6 +32,7 @@ DEPENDENCIES
bundler (~> 1.0.0)
jeweler (~> 1.5.2)
log4r (> 1.1.6)
+ rake (>= 0.9.2)
rcov
rspec (>= 2.3.0)
shoulda
View
14 Rakefile
@@ -30,13 +30,13 @@ Support for external FASTA files.
end
Jeweler::RubygemsDotOrgTasks.new
-# require 'rake/testtask'
-# Rake::TestTask.new(:test) do |test|
-# test.libs << 'lib' << 'test'
-# test.pattern = 'test/**/test_*.rb'
-# test.verbose = true
-# Kernel.system('rspec spec/*.rb')
-# end
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
+ Kernel.system('rspec spec/*.rb')
+end
#require 'spec/rake/spectask'
#Spec::Rake::SpecTask.new(:spec) do |t|
View
6 test/data/regression/test_ext_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -42,8 +41,6 @@
INFO bio-gff3: Adding CDS <cds1> <>
INFO bio-gff3: Adding CDS <cds1> <>
INFO bio-gff3: Adding CDS <cds2> <>
- INFO bio-gff3: Memory used After reading GFF RAM 10M, VMEM 14M
- INFO bio-gff3: Memory used After reading FASTA RAM 10M, VMEM 14M
INFO bio-gff3: find_component: Matched (long search) column 0 and location <Clone:AL12345.2>
WARN bio-gff3: No sequence information for <mRNA:trans-8>
INFO bio-gff3: find_component: Matched (long search) column 0 and location <Clone:ABC123>
@@ -56,5 +53,4 @@ GAAGATTTGTAT
TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTC
INFO bio-gff3: find_component: Matched seqname <test01>
>mrna01a Sequence:test01_1:400 (101:280)
-TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTCGTCCTGTAGAGACGTCACAGCCAACGTGCCTTCTTATCTTGATACATTAGT
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTCGTCCTGTAGAGACGTCACAGCCAACGTGCCTTCTTATCTTGATACATTAGT
View
6 test/data/regression/test_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -44,8 +43,6 @@
INFO bio-gff3: Adding CDS <cds1> <>
INFO bio-gff3: Adding CDS <cds1> <>
INFO bio-gff3: Adding CDS <cds2> <>
- INFO bio-gff3: Memory used After reading GFF RAM 10M, VMEM 14M
- INFO bio-gff3: Memory used After reading FASTA RAM 10M, VMEM 14M
INFO bio-gff3: find_component: Matched (long search) column 0 and location <Transcript:trans-1>
WARN bio-gff3: No sequence information for <Transcript:trans-1>
INFO bio-gff3: find_component: Matched (long search) column 0 and location <Clone:AL12345.2>
@@ -60,5 +57,4 @@ GAAGATTTGTAT
TGGCGACTATCGGTCGAAGTTAAGACATTCATGGGC
INFO bio-gff3: find_component: Matched seqname <test01>
>cds2 Sequence:test01_1:400 (192:200)
-TTCATGGGC
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+TTCATGGGC
View
4 test/data/regression/test_lrucache_ext_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash (LruCache) <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -60,5 +59,4 @@ TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGA
TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTCGTCCTGTAGAGACGTCACAGCCAACGTGCCTTCTTATCTTGATACATTAGT
INFO bio-gff3: Cache calls After iterating = 54 <>
INFO bio-gff3: Cache hits After iterating = 37 <>
- INFO bio-gff3: Cache misses After iterating = 17 <>
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+ INFO bio-gff3: Cache misses After iterating = 17 <>
View
4 test/data/regression/test_lrucache_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash (LruCache) <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -64,5 +63,4 @@ TGGCGACTATCGGTCGAAGTTAAGACATTCATGGGC
TTCATGGGC
INFO bio-gff3: Cache calls After iterating = 76 <>
INFO bio-gff3: Cache hits After iterating = 52 <>
- INFO bio-gff3: Cache misses After iterating = 24 <>
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+ INFO bio-gff3: Cache misses After iterating = 24 <>
View
4 test/data/regression/test_nocache_ext_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash (NoCache) <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -54,5 +53,4 @@ GAAGATTTGTAT
TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTC
INFO bio-gff3: find_component: Matched seqname <test01>
>mrna01a Sequence:test01_1:400 (101:280)
-TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTCGTCCTGTAGAGACGTCACAGCCAACGTGCCTTCTTATCTTGATACATTAGT
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+TATTTGCCACCTAGAAGCGCAACATGCCCAGCTTCACACACCATAGCGAACACGCCGCCCCGGTGGCGACTATCGGTCGAAGTTAAGACAATTCATGGGCGAAACGAGATAATGGGTACTGCACCCCTCGTCCTGTAGAGACGTCACAGCCAACGTGCCTTCTTATCTTGATACATTAGT
View
4 test/data/regression/test_nocache_gff3.rtest
@@ -1,4 +1,3 @@
- INFO bio-gff3: Memory used BaseLine RAM 10M, VMEM 14M
INFO bio-gff3: ---- Digest DB and store data in mRNA Hash (NoCache) <>
INFO bio-gff3: Added transcript with component ID Transcript:trans-1 <>
INFO bio-gff3: Adding exon <Transcript:trans-1> <>
@@ -58,5 +57,4 @@ GAAGATTTGTAT
TGGCGACTATCGGTCGAAGTTAAGACATTCATGGGC
INFO bio-gff3: find_component: Matched seqname <test01>
>cds2 Sequence:test01_1:400 (192:200)
-TTCATGGGC
- INFO bio-gff3: Memory used Done RAM 10M, VMEM 14M
+TTCATGGGC
View
2 test/regressiontest.rb
@@ -16,7 +16,7 @@ def RegressionTest.create b
# in test/regression with +filename+. When +create+ is +true+ the file
# will be created/overwritten. Otherwise it is tested against returning
# whether it has equal or not. When a test fails both test file and new
- # file exist in the regrssion directory - so you can execute a diff.
+ # file exist in the regression directory - so you can execute a diff.
#
# Example:
# RegressionTest.test `#{cfrubybin} --help`,'cfruby_helptext',$test_create
View
8 test/test_bio-gff3.rb
@@ -1,3 +1,7 @@
+# To recreate the regression files:
+#
+# ruby -Itest test/test_bio-gff3.rb --create
+
$: << '.'
do_create = if ARGV[0] == '-c' or ARGV[0] == '--create'
ARGV.shift
@@ -38,5 +42,7 @@ def this_method
def single_run opts, name
cmd = "#{BIN} --logger stdout #{opts}"
# p cmd
- RegressionTest.test `#{cmd}`,name,"#{DAT}/regression"
+ text = `#{cmd}`.split(/\n/).delete_if { | s | s =~ /Memory/ }.join("\n")
+
+ RegressionTest.test text,name,"#{DAT}/regression"
end

0 comments on commit 6b95455

Please sign in to comment.