Permalink
Browse files

Merge branch 'services-r10' into master

commit 8723f18
Author: Andrew Liu <aliu@vmware.com>
Date:   Fri Apr 13 14:19:24 2012 +0800

    revendor base gem to include r9 commits

    Change-Id: Icdcabd36ceaad9fe17cc005d627dd3522e02164b

commit 7c893a9
Merge: 554be90 8d21b04
Author: Andrew Liu <aliu@vmware.com>
Date:   Fri Apr 13 14:15:07 2012 +0800

    Merge remote branch 'origin/services-r9' into r10

    Conflicts:
    	atmos/vendor/cache/vcap_services_base-0.1.8.gem
    	filesystem/vendor/cache/vcap_services_base-0.1.8.gem
    	mongodb/vendor/cache/vcap_services_base-0.1.8.gem
    	mysql/vendor/cache/vcap_services_base-0.1.8.gem
    	neo4j/vendor/cache/vcap_services_base-0.1.8.gem
    	postgresql/vendor/cache/vcap_services_base-0.1.8.gem
    	rabbit/vendor/cache/vcap_services_base-0.1.8.gem
    	redis/vendor/cache/vcap_services_base-0.1.8.gem
    	service_broker/vendor/cache/vcap_services_base-0.1.8.gem
    	vblob/vendor/cache/vcap_services_base-0.1.8.gem

    Change-Id: Iaac55526897acf42ed75fe3c08a96c1ca8b0687c

commit 554be90
Author: Andrew Liu <aliu@vmware.com>
Date:   Tue Apr 10 22:33:05 2012 +0800

    create new redis client in lock refresh thread

    Change-Id: I73f4efff1a7fda8bdc05b29eb216031137622fa8

commit 1d5dafe
Author: felixhoo <hhu@vmware.com>
Date:   Sat Apr 7 11:08:11 2012 -0600

    Invoke each run task in a fiber context

    Change-Id: Ibb7a167e6b5b4ea775d25bbddd7cbd702360e79e

commit 9468503
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Apr 1 14:45:52 2012 -0700

    Fix capacity calculation for service migration

    Change-Id: I2befe4eed16a190e2128a8744a44a9f72bff57dc

commit 11c38be
Merge: bb3c024 f202332
Author: Frank Lu <flu@vmware.com>
Date:   Thu Apr 5 05:50:19 2012 +0000

    Merge "Parent role should not be blocked in disable_instance" into services-r10

commit bb3c024
Author: felixhoo <hhu@vmware.com>
Date:   Wed Apr 4 11:31:56 2012 -0600

    Add base gem to backupmanager

    Change-Id: I1c5bc77fb8f7196a7c29ed4f242753807e89a390

commit f202332
Author: Frank Lu <flu@vmware.com>
Date:   Sun Apr 1 09:14:39 2012 -0600

    Parent role should not be blocked in disable_instance

      1. Default user (Parent role) should not be blocked for it will be used in dump_instance
      2. Unit test update: kill long transaction should only work for normal user rather than default user and super user

    Change-Id: I032ac9060eef24f476d9d947c550ee952b0ca1a8

commit c5e63e1
Merge: b1ae681 c9d79a9
Author: Andrew Liu <aliu@vmware.com>
Date:   Tue Apr 3 05:08:59 2012 +0000

    Merge "add snapshot quota and delete snapshot job" into services-r10

commit c9d79a9
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 14 22:18:27 2012 -0700

    add snapshot quota and delete snapshot job

    also update async job framwork:
    1. Unify job related namespace to VCAP::Services::Base::AsyncJob
    2. Update resque and resque-status gem
    3. Move common job logic into base.

    Change-Id: I2dac7d2d2b5ed20003926a607f4fdaf96096e33e

commit b1ae681
Author: Yang Yang <yangy@vmware.com>
Date:   Sun Apr 1 19:46:12 2012 -0700

    fixed a bug in base unit test:

    1. re-edited the MockErrorNode malformed message so that it can be encoded in json

    Change-Id: If337faccb5c4c2daf906039cbc1e18af99c4a6c0

commit 37dc696
Author: Chunjie <czhu@vmware.com>
Date:   Sat Mar 31 06:30:12 2012 -0700

    Add over provisioning support within varz.

    Change-Id: I276e5b99a593ca3cdb652d5c28ba0278ef622143

commit e637210
Merge: 38f9ce0 41132b6
Author: Chunjie <czhu@vmware.com>
Date:   Sat Mar 31 13:12:21 2012 +0000

    Merge "Add varz support for serialization data server." into services-r10

commit 38f9ce0
Merge: c9fcb39 9e5f01e
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Sat Mar 31 13:06:36 2012 +0000

    Merge "clean up unit test directory under /tmp" into services-r10

commit c9fcb39
Merge: 7acca15 308934c
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Sat Mar 31 13:05:27 2012 +0000

    Merge "neo4j unit test clean up" into services-r10

commit 308934c
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Sat Mar 31 03:18:25 2012 -0600

    neo4j unit test clean up

    Change-Id: I97d22c3c7334d15b1ab71cd755f8840792e07912

commit 9e5f01e
Author: felixhoo <hhu@vmware.com>
Date:   Sat Mar 31 03:34:11 2012 -0600

    clean up unit test directory under /tmp

    Change-Id: Id1a7789dc74b3e9d156e8824f0a2292c9957de73

commit 7acca15
Author: figo <figof@mozy.com>
Date:   Sat Mar 31 00:16:00 2012 -0700

    add additional option for db_size_overhead to start pg nodewq

    Change-Id: I65b5c31c72e6c35832c105cc42376de980d604f5

commit c14b4d0
Author: Frank Lu <flu@vmware.com>
Date:   Tue Mar 13 02:51:25 2012 -0600

    backup/dump/import/restore/snapshot/serialize postgresql databases using parent role rather than superuser

         1. Use the default user (parent role) rather than the super user to backup/dump/import/restore/snapshot/serialize the provisioned database
         2. Add model.rb: list all DataMapper relative classes
         3. Prevent the long-time queries/transctions submmitted by parent roles and super users from being killed
         4. Filter the long-time queries/transactions by postgresql query rather than ruby statements
         5. Support wqsnapshot/serialization jobs
         6. Fix the issue that unit test will generate residual databases in postgresql

    Change-Id: Iefed934f5627f0874d4e789cac5a1d6329609f03

commit 50ac823
Merge: bb55965 402b92c
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Thu Mar 29 22:37:51 2012 +0000

    Merge "add quota and obj_limit configuration in vblob" into services-r10

commit bb55965
Author: figo <figof@mozy.com>
Date:   Thu Mar 29 06:00:24 2012 -0700

    psql quota should be max_db_size + db_size_overhead

    Change-Id: I544ad93e2a061a3637747e18c647636bdd677bb8

commit 41132b6
Author: Chunjie <czhu@vmware.com>
Date:   Thu Mar 29 00:25:12 2012 -0700

    Add varz support for serialization data server.

    The collector handler for serialization data server will be present soon.

    Change-Id: I0d5da6dbffb3cb655efb1d49d1199a0c551fd97f

commit 099b168
Merge: a2a39b2 49ecfe7
Author: figo <figof@mozy.com>
Date:   Thu Mar 29 06:46:58 2012 +0000

    Merge "make sure to close redis connection for varz" into services-r10

commit 49ecfe7
Author: figo <figof@mozy.com>
Date:   Wed Mar 28 01:57:20 2012 -0700

    make sure to close redis connection for varz

    Change-Id: I3e23a37b7fc1a034461398b46015b94523259af8

commit a2a39b2
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 28 13:54:41 2012 +0800

    remove logging gem from services repository

    Change-Id: Ic9059f57964cb67d59414ceadf960c28f9a018f2

commit 402b92c
Author: SonicWang <wangs@vmware.com>
Date:   Tue Mar 27 10:44:32 2012 -0700

    add quota and obj_limit configuration in vblob

    Change-Id: Icd0d28007637aeb805c4c3614fd476ae1b03a89e

commit c5d3a2d
Merge: d2af5cf d3fb525
Author: SonicWang <wangs@vmware.com>
Date:   Tue Mar 27 17:16:41 2012 +0000

    Merge "remove max_memory parameter in vblob" into services-r10

commit d2af5cf
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 26 23:16:57 2012 -0700

    added a fake unit test for serialization data server for ci

    Change-Id: I7b62c4643dbdceb9c7d062b1cd593d74573468d8

commit 38c990e
Merge: 0b38eb1 9abcf88
Author: felixhoo <hhu@vmware.com>
Date:   Tue Mar 27 05:58:55 2012 +0000

    Merge "Add varz into backup manager" into services-r10

commit 0b38eb1
Merge: a25bf59 e0d4bd5
Author: Tang Rui <rtang@vmware.com>
Date:   Tue Mar 27 05:58:10 2012 +0000

    Merge "Kill epmd process used by rabbitmq server when finish unit test" into services-r10

commit a25bf59
Merge: 74288dd 89215eb
Author: Tang Rui <rtang@vmware.com>
Date:   Tue Mar 27 05:57:55 2012 +0000

    Merge "In redis provision, the node need wait for the start of the redis-server process" into services-r10

commit e0d4bd5
Author: Tang Rui <rtang@vmware.com>
Date:   Mon Mar 26 20:17:21 2012 -0700

    Kill epmd process used by rabbitmq server when finish unit test

    Change-Id: If76fc071f32cc9ffc429d9f8fb678e217cffd6dd

commit 89215eb
Author: Tang Rui <rtang@vmware.com>
Date:   Mon Mar 26 00:24:31 2012 -0700

    In redis provision, the node need wait for the start of the redis-server process

    Change-Id: I3722efc26846bf180ce6ead3c786bd9a03b2d979

commit 74288dd
Merge: ae48e35 bdcdffb
Author: felixhoo <hhu@vmware.com>
Date:   Mon Mar 26 20:09:48 2012 +0000

    Merge "Remove pid and add quota in worker config" into services-r10

commit d3fb525
Author: SonicWang <wangs@vmware.com>
Date:   Mon Mar 26 10:37:51 2012 -0700

    remove max_memory parameter in vblob

    Change-Id: I8963a7d88df83a96e1c9beef0360e0e537419405

commit 9abcf88
Author: felixhoo <hhu@vmware.com>
Date:   Mon Mar 26 01:20:31 2012 -0600

    Add varz into backup manager

    Change-Id: I777e5e141048202de5638a4930f33cbbe120cac7

commit ae48e35
Author: felixhoo <hhu@vmware.com>
Date:   Sun Mar 25 13:48:43 2012 -0600

    Fix time deviation of mysql backup

    Change-Id: I44b35a35a1adb1c7e0778766894046f3957d206b

commit bdcdffb
Author: felixhoo <hhu@vmware.com>
Date:   Sat Mar 24 12:58:14 2012 -0600

    Remove pid and add quota in worker config

    Change-Id: Ifdcd6e6e9fcc8df8f6db78775fa024990a757604

commit a3de99a
Merge: 493fc4c d45578d
Author: Tang Rui <rtang@vmware.com>
Date:   Fri Mar 23 03:53:27 2012 +0000

    Merge "Fix the redis warning: Could not cleanup instance, the reasons: ["ERR max number of clients reached"]" into services-r10

commit 493fc4c
Merge: 0e3e341 510817c
Author: Yang Yang <yangy@vmware.com>
Date:   Fri Mar 23 01:55:21 2012 +0000

    Merge "removed unused clover generator for coverage report for ci." into services-r10

commit 0e3e341
Merge: 0055e0e 2c5003c
Author: Andrew Liu <aliu@vmware.com>
Date:   Thu Mar 22 10:42:50 2012 +0000

    Merge "correct column name in user query" into services-r10

commit 510817c
Author: Yang Yang <yangy@vmware.com>
Date:   Thu Mar 22 13:54:47 2012 +0800

    removed unused clover generator for coverage report for ci.

    Change-Id: Ic1cc87da39406491ca6270533e8910a19970b6f1

commit d45578d
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 21:36:13 2012 -0700

    Fix the redis warning: Could not cleanup instance, the reasons: ["ERR max number of clients reached"]

    Change-Id: I2c9988c4337a42ca98409ca6a053985724cf6c5b

commit 0055e0e
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 20:35:52 2012 -0700

    Fix the bug that rabbit doesn't delete instance's logs when unprovision

    Change-Id: I13d84574c712b84080a881305b00c65ba9175eea

commit 2c5003c
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 21 20:59:43 2012 +0800

    correct column name in user query

    Change-Id: Ib8ecd3f1ed11c5335d3f329b3a0c32cbf92dd019

commit 1d817df
Merge: 270634d dd67734
Author: Yang Yang <yangy@vmware.com>
Date:   Wed Mar 21 08:43:48 2012 +0000

    Merge "added coverage report generation feature for services" into services-r10

commit 270634d
Merge: f69403b ae50dc5
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 03:00:12 2012 +0000

    Merge "Each service node code need check datamapper object before destroy" into services-r10

commit dd67734
Author: Yang Yang <yangy@vmware.com>
Date:   Tue Mar 20 17:46:25 2012 +0800

    added coverage report generation feature for services

    1. reconstruct the feature to create coverage report generation using
      SimpleCov for the following services:
      base, atmos, filesystem, mongodb, mysql, neo4j, postgresql, rabbit,
      redis, serialization_data_server, service_broker, vblob.

    2. finished the unit test for using with the following rake command:
      bundle exec rake spec          # unit test without any report
      bundle exec rake spec:ci       # unit test with report for rcov and ci
      bundle exec rake spec:rcov     # unit test with report for rcov only

    3. added corresponding gem to the vendor/cache/ mainly for simplecov.

    Change-Id: I6a1cf069b38da65b5f5d4f3fc7ee6580ce7b587c

commit ae50dc5
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Mar 18 22:35:55 2012 -0700

    Each service node code need check datamapper object before destroy

    Change-Id: Id5100305368b8d9525bc54914ebeab150c67dbfe

commit ff2a632
Merge: 68b0d4f ec3334f
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Mar 18 19:59:30 2012 -0700

    Merge branch 'services-r9' into 'services-10'

    Change-Id: I81650bc1a08ac431aeceb97b686df17486f78c4d

commit f69403b
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Sat Mar 17 18:01:52 2012 +0800

    Fix max connection test failure on some machines

    Change-Id: I37219c4f02993a03ae4d344b072761558630f3c1

commit 68b0d4f
Author: felixhoo <hhu@vmware.com>
Date:   Thu Mar 15 00:54:53 2012 -0600

    Update varz only when nats is enabled.

    Change-Id: I508a6bb8a795030ac7589857120130f0b5451e8c

commit ce1262b
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 12 13:29:39 2012 +0800

    added the feature to auto generate spec report for ci

    1. added spec report generation feature for ci for:
          atmos, base, filesystem, mongodb, mysql, neo4j,
          postgresql, rabbit, redis, serialization_data_server,
          service_broker, vblob

    2. added a namespace called ci with task spec:
        for the new unit test with reports generated, do:
          bundle exec rake ci:spec
        the reports would sit in spec_report in the xml format, which can be recognized by jenkins.

    Change-Id: Ic2ff8dd863dbb6bfe632929f8e9b556bb27bb53b

commit 5cab0f4
Merge: d87fd5a 7df1576
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Tue Mar 13 09:06:25 2012 +0000

    Merge "make mongodb unit test pass even without dev_setup env" into services-r10

commit d87fd5a
Merge: f560734 7181377
Author: Yang Yang <yangy@vmware.com>
Date:   Tue Mar 13 07:07:27 2012 +0000

    Merge "fixed a bug in the service_broker unit test" into services-r10

commit 7181377
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 12 20:19:07 2012 +0800

    fixed a bug in the service_broker unit test

    case: when the directory for local_db does not exist, the unit test will return a failure
    fix: added code to check whether the directory for local_db exists or not, create a directory
         if it does not exist.

    Change-Id: Iacc0bdae3c564847e3793f9e3f636889a02e2683

commit 7df1576
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Mon Mar 12 23:39:43 2012 -0600

    make mongodb unit test pass even without dev_setup env

    Change-Id: I4a722cbdbb79883bc4c82613cc7d7ffe936e37ad

commit f560734
Merge: 250def1 5ee7655
Author: figo <figof@mozy.com>
Date:   Mon Mar 12 18:48:03 2012 -0700

    Merge branch 'services-r9' into services-r10

    Change-Id: Ifd3d6f9435204825b635ce9f301c05fadb19ed37

commit 250def1
Merge: d63882e cd74fa6
Author: figo <figof@mozy.com>
Date:   Sun Mar 11 23:35:02 2012 -0700

    Merge branch 'master' into services-r10

    Conflicts:
    	atmos/Gemfile.lock
    	base/Gemfile.lock
    	base/lib/base/provisioner.rb
    	base/lib/base/version.rb
    	filesystem/Gemfile.lock
    	mongodb/Gemfile.lock
    	mysql/Gemfile.lock
    	neo4j/Gemfile.lock
    	postgresql/Gemfile.lock
    	redis/Gemfile.lock
    	service_broker/Gemfile.lock

    Change-Id: Iedc2e2ba29f714a581f8b84d44a4f87239113592

commit d63882e
Author: figo <figof@mozy.com>
Date:   Tue Feb 28 08:16:15 2012 -0800

    Revert "Revert "Merge branch 'services-r8' into services-r9""

    This reverts commit 409cd99.

    Change-Id: Iacd317820455695b924217a55fded5659e289cfb

Change-Id: I9f335be5f0ca124285eebdc145ca9cdcb56ace68
  • Loading branch information...
1 parent fb5fdf4 commit 6f4ce7109a5f6207b598bb7c455affc9e04a6690 figo committed Apr 17, 2012
Showing 378 changed files with 4,031 additions and 1,980 deletions.
View
@@ -1,4 +1,4 @@
-SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker vblob)
+SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker vblob tools/backup/manager)
desc "Run integration tests."
task "tests" do |t|
@@ -8,7 +8,7 @@ end
namespace "bundler" do
desc "Update base gem"
task "update_base" do
- system "cd base && rake bundler:install"
+ system "cd base && rm -rf pkg && rake bundler:install"
SERVICES_DIR.each do |dir|
puts ">>>>>>>> enter #{dir}"
system "rm -f #{dir}/vendor/cache/vcap_services_base-*.gem && cp base/pkg/vcap_services_base-*.gem #{dir}/vendor/cache && cd #{dir} && bundle install --local"
View
@@ -19,5 +19,7 @@ group :test do
gem "rake"
gem "rspec"
gem "rcov"
+ gem "simplecov"
+ gem "simplecov-rcov"
gem "ci_reporter"
end
View
@@ -64,9 +64,6 @@ GEM
fastercsv (1.5.4)
json (1.4.6)
json_pure (1.6.5)
- little-plugger (1.1.3)
- logging (1.6.1)
- little-plugger (>= 1.1.2)
macaddr (1.5.0)
systemu (>= 2.4.0)
multi_json (1.0.4)
@@ -85,15 +82,15 @@ GEM
redisk (0.2.2)
redis (>= 0.1.1)
redis-namespace (>= 0.1.0)
- resque (1.19.0)
+ resque (1.20.0)
multi_json (~> 1.0)
redis-namespace (~> 1.0.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
- resque-status (0.2.4)
+ resque-status (0.3.2)
redisk (>= 0.2.1)
- resque (>= 1.3.1)
- uuid (>= 2.0.2)
+ resque (~> 1.19)
+ uuid (~> 2.3)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
@@ -103,17 +100,23 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
ruby-hmac (0.4.0)
+ simplecov (0.5.4)
+ multi_json (~> 1.0.3)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ simplecov-rcov (0.2.3)
+ simplecov (>= 0.4.1)
sinatra (1.2.7)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
stringex (1.2.1)
- systemu (2.4.2)
+ systemu (2.5.0)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.3)
- uuid (2.3.4)
+ uuid (2.3.5)
macaddr (~> 1.0)
uuidtools (2.1.2)
vcap_common (1.0.8)
@@ -123,24 +126,24 @@ GEM
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
vcap_logging (0.1.3)
- vcap_services_base (0.1.8)
+ vcap_services_base (0.1.9)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
em-http-request (~> 0.3.0)
eventmachine (~> 0.12.11.cloudfoundry.3)
eventmachine_httpserver (~> 0.2.1)
json (~> 1.4.6)
- logging (>= 1.5.0)
nats (~> 0.4.22.beta.8)
- resque-status (~> 0.2.4)
+ resque (~> 1.20)
+ resque-status (~> 0.3.2)
ruby-hmac (~> 0.4.0)
sinatra (~> 1.2.3)
thin (~> 1.3.1)
uuidtools (~> 2.1.2)
vcap_common (>= 1.0.8)
vcap_logging (>= 0.1.3)
- vegas (0.1.8)
+ vegas (0.1.11)
rack (>= 1.0.0)
xml-simple (1.0.15)
yajl-ruby (0.8.3)
@@ -159,6 +162,8 @@ DEPENDENCIES
rcov
rspec
ruby-hmac
+ simplecov
+ simplecov-rcov
sinatra
thin
uuidtools
View
@@ -3,9 +3,12 @@ require 'rake'
desc "Run specs"
task "spec" => ["bundler:install:test", "test:spec"]
-desc "Run specs using RCov"
+desc "Run specs using SimpleCov"
task "spec:rcov" => ["bundler:install:test", "test:spec:rcov"]
+desc "Run ci using SimpleCov"
+task "spec:ci" => ["bundler:install:test", "test:spec:ci"]
+
namespace "bundler" do
desc "Install gems"
task "install" do
@@ -33,7 +36,11 @@ namespace "test" do
sh("cd spec && ../../base/bin/nats-util start && rake spec && ../../base/bin/nats-util stop")
end
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
+ task "spec:rcov" do |t|
+ sh("cd spec && ../../base/bin/nats-util start && rake simcov && ../../base/bin/nats-util stop")
+ end
+
+ task "spec:ci" do |t|
+ sh("cd spec && ../../base/bin/nats-util start && rake spec:ci && ../../base/bin/nats-util stop")
end
end
View
@@ -9,33 +9,41 @@ require 'rspec'
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'
+require "simplecov"
+require "simplecov-rcov"
+
coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_coverage"))
reports_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_reports"))
-dump_file = File.join(Dir.tmpdir, "atmos.rcov")
-ignore_pattern = 'spec,[.]bundle,[/]gems[/]'
ENV['CI_REPORTS'] = reports_dir
desc "Run specs using RCov"
-task "spec:rcov" => ["ci:setup:rspec", "spec:rcov_internal", "convert_rcov_to_clover"]
+task "spec:ci" => ["ci:setup:rspec", "simcov"]
RSpec::Core::RakeTask.new do |t|
t.pattern = "**/*_spec.rb"
t.rspec_opts = ["--format", "documentation", "--colour"]
end
-desc "Run specs using RCov (internal, use spec:rcov instead)"
-RSpec::Core::RakeTask.new("spec:rcov_internal") do |t|
- sh("rm -f #{dump_file}")
- t.pattern = "**/*_spec.rb"
- t.rspec_opts = ["--format", "progress", "--colour"]
- t.rcov = true
- t.rcov_opts = ['--aggregate', dump_file, '--exclude', ignore_pattern, '--output', coverage_dir]
+desc "Run spec with coverage"
+task "simcov" => "cleanup_coverage" do
+ class SimpleCov::Formatter::CombinedFormatter
+ def format(result)
+ SimpleCov::Formatter::RcovFormatter.new.format(result)
+ end
+ end
+
+ SimpleCov.formatter = SimpleCov::Formatter::CombinedFormatter
+ SimpleCov.root('..')
+ SimpleCov.coverage_dir('spec_coverage')
+ SimpleCov.start do
+ add_filter "/spec/"
+ spec_dir = File.expand_path("..", __FILE__)
+ Rspec::Core::Runner.disable_autorun!
+ Rspec::Core::Runner.run([spec_dir], STDERR, STDOUT)
+ end
end
-task "convert_rcov_to_clover" do |t|
- analyzer = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "tests", "common", "rcov_analyzer.rb"))
- clover_output = File.join(coverage_dir, "clover.xml")
- sh("ruby #{analyzer} #{dump_file} #{ignore_pattern} > #{clover_output}")
- sh("rm -f #{dump_file}")
+task "cleanup_coverage" do
+ rm_rf coverage_dir
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -8,4 +8,6 @@ group :test do
gem "rspec"
gem "rcov"
gem "ci_reporter"
+ gem "simplecov"
+ gem "simplecov-rcov"
end
View
@@ -1,17 +1,17 @@
PATH
remote: .
specs:
- vcap_services_base (0.1.8)
+ vcap_services_base (0.1.9)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
em-http-request (~> 0.3.0)
eventmachine (~> 0.12.11.cloudfoundry.3)
eventmachine_httpserver (~> 0.2.1)
json (~> 1.4.6)
- logging (>= 1.5.0)
nats (~> 0.4.22.beta.8)
- resque-status (~> 0.2.4)
+ resque (~> 1.20)
+ resque-status (~> 0.3.2)
ruby-hmac (~> 0.4.0)
sinatra (~> 1.2.3)
thin (~> 1.3.1)
@@ -22,14 +22,14 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.6)
+ addressable (2.2.7)
bcrypt-ruby (2.1.4)
builder (3.0.0)
ci_reporter (1.6.4)
builder (>= 2.1.2)
curb (0.7.16)
daemons (1.1.8)
- data_objects (0.10.7)
+ data_objects (0.10.8)
addressable (~> 2.1)
datamapper (1.1.0)
dm-aggregates (= 1.1.0)
@@ -67,8 +67,8 @@ GEM
uuidtools (~> 2.1.2)
dm-validations (1.1.0)
dm-core (~> 1.1.0)
- do_sqlite3 (0.10.7)
- data_objects (= 0.10.7)
+ do_sqlite3 (0.10.8)
+ data_objects (= 0.10.8)
em-http-request (0.3.0)
addressable (>= 2.0.0)
escape_utils
@@ -79,13 +79,10 @@ GEM
fastercsv (1.5.4)
json (1.4.6)
json_pure (1.6.5)
- little-plugger (1.1.3)
- logging (1.6.1)
- little-plugger (>= 1.1.2)
macaddr (1.5.0)
systemu (>= 2.4.0)
multi_json (1.0.4)
- nats (0.4.22.beta.8)
+ nats (0.4.22)
daemons (>= 1.1.4)
eventmachine (>= 0.12.10)
json_pure (>= 1.6.1)
@@ -100,15 +97,15 @@ GEM
redisk (0.2.2)
redis (>= 0.1.1)
redis-namespace (>= 0.1.0)
- resque (1.19.0)
+ resque (1.20.0)
multi_json (~> 1.0)
redis-namespace (~> 1.0.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
- resque-status (0.2.4)
+ resque-status (0.3.2)
redisk (>= 0.2.1)
- resque (>= 1.3.1)
- uuid (>= 2.0.2)
+ resque (~> 1.19)
+ uuid (~> 2.3)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
@@ -118,17 +115,23 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
ruby-hmac (0.4.0)
+ simplecov (0.5.4)
+ multi_json (~> 1.0.3)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ simplecov-rcov (0.2.3)
+ simplecov (>= 0.4.1)
sinatra (1.2.3)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
stringex (1.2.2)
- systemu (2.4.2)
+ systemu (2.5.0)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.2.2)
- uuid (2.3.4)
+ uuid (2.3.5)
macaddr (~> 1.0)
uuidtools (2.1.2)
vcap_common (1.0.10)
@@ -139,7 +142,7 @@ GEM
yajl-ruby (~> 0.8.3)
vcap_logging (1.0.0)
rake
- vegas (0.1.8)
+ vegas (0.1.11)
rack (>= 1.0.0)
yajl-ruby (0.8.3)
@@ -151,5 +154,7 @@ DEPENDENCIES
rake
rcov
rspec
+ simplecov
+ simplecov-rcov
sinatra
vcap_services_base!
View
@@ -4,9 +4,12 @@ require 'bundler'
desc "Run specs"
task "spec" => ["bundler:install:test", "test:spec"]
-desc "Run specs using RCov"
+desc "Run specs using SimpleCov"
task "spec:rcov" => ["bundler:install:test", "test:spec:rcov"]
+desc "Run ci using SimpleCov"
+task "spec:ci" => ["bundler:install:test", "test:spec:ci"]
+
namespace "bundler" do
gem_helper = Bundler::GemHelper.new(Dir.pwd)
desc "Build gem package"
@@ -44,7 +47,11 @@ namespace "test" do
sh("cd spec && ../bin/nats-util start && rake spec && ../bin/nats-util stop")
end
- task "spec:rcov" do |t|
- sh("cd spec && rake spec:rcov")
+ task "spec:rcov" do |t|
+ sh("cd spec && ../bin/nats-util start && rake simcov && ../bin/nats-util stop")
+ end
+
+ task "spec:ci" do |t|
+ sh("cd spec && ../bin/nats-util start && rake spec:ci && ../bin/nats-util stop")
end
end
Oops, something went wrong.

0 comments on commit 6f4ce71

Please sign in to comment.