Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Coveralls code coverage report. #166

Merged
merged 5 commits into from Sep 1, 2016

Conversation

Projects
None yet
4 participants
@mvidner
Copy link
Member

commented Jun 20, 2016

https://coveralls.io/github/yast/yast-packager

Also added one forgotten file to the list of tests executed at rpm build.

add_filter "/test/"
end

# For coverage we need to load all ruby files

This comment has been minimized.

Copy link
@mvidner

mvidner Jun 20, 2016

Author Member

And that makes the test fail with

/usr/lib/ruby/vendor_ruby/2.1.0/yast/yast.rb:168:in `import_pure': component cannot import namespace 'SLP' (NameError)
    from /usr/lib/ruby/vendor_ruby/2.1.0/yast/yast.rb:168:in `import'
    from /home/travis/build/yast/yast-packager/src/modules/SourceManagerSLP.rb:19:in `main'

This comment has been minimized.

Copy link
@mvidner

mvidner Aug 31, 2016

Author Member

Worked around a few lines below here

@mvidner mvidner force-pushed the coveralls branch from d6cd046 to ce3987e Jun 23, 2016

@coveralls

This comment has been minimized.

Copy link

commented Jun 23, 2016

Coverage Status

Changes Unknown when pulling ce3987e on coveralls into * on master*.

@coveralls

This comment has been minimized.

Copy link

commented Jun 23, 2016

Coverage Status

Changes Unknown when pulling 1a52fa4 on coveralls into * on master*.

@coveralls

This comment has been minimized.

Copy link

commented Jun 23, 2016

Coverage Status

Changes Unknown when pulling 0159c67 on coveralls into * on master*.

@jreidinger

This comment has been minimized.

Copy link
Member

commented Jul 21, 2016

@mvidner still failing, will you fix it?

@mvidner

This comment has been minimized.

Copy link
Member Author

commented Aug 31, 2016

I have found the problem with the tests, I'm fixing this.

@mvidner mvidner force-pushed the coveralls branch 2 times, most recently from cc4cf9d to c9a97eb Aug 31, 2016

@coveralls

This comment has been minimized.

Copy link

commented Aug 31, 2016

Coverage Status

Changes Unknown when pulling c9a97eb on coveralls into on master.

.travis.yml Outdated
@@ -5,10 +5,11 @@ before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "yast2-devtools yast2-testsuite yast2 yast2-pkg-bindings yast2-country-data yast2-storage" -g rspec:3.3.0
- sh ./travis_setup.sh -p "rake yast2-devtools yast2-testsuite yast2 yast2-pkg-bindings yast2-country-data yast2-storage" -g "rspec:3.3.0 yast-rake simplecov:0.10.0 coveralls"

This comment has been minimized.

Copy link
@lslezak

lslezak Sep 1, 2016

Member

Could you try it again with the latest simplecov gem? I'd like to avoid freezing that gem if possible...

# use coveralls for on-line code coverage reporting at Travis CI
if ENV["TRAVIS"]
require "coveralls"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([

This comment has been minimized.

Copy link
@lslezak

lslezak Sep 1, 2016

Member

There is a new simplified API for multiple formatters:

SimpleCov.formatters = [
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]

We should update this also in the other modules....

@mvidner mvidner force-pushed the coveralls branch from c9a97eb to 6de34c6 Sep 1, 2016

mvidner added some commits Jun 20, 2016

Use Yast::RSpec::SCR#change_scr_root properly
so as not to mess up other tests by leaving SCR switched to our own root
Test a slightly different code path to make tests pass.
This is because this file was omitted from the list of tests when
#185
was merged.

@mvidner mvidner force-pushed the coveralls branch from 6de34c6 to 73e60c1 Sep 1, 2016

@coveralls

This comment has been minimized.

Copy link

commented Sep 1, 2016

Coverage Status

Changes Unknown when pulling 73e60c1 on coveralls into * on master*.

@mvidner

This comment has been minimized.

Copy link
Member Author

commented Sep 1, 2016

Thanks for the tips! Applied.

@lslezak

This comment has been minimized.

Copy link
Member

commented Sep 1, 2016

LGTM, thanks!

@mvidner mvidner merged commit dff4982 into master Sep 1, 2016

4 checks passed

Jenkins CI The build succeeded.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 32.654%
Details

@mvidner mvidner deleted the coveralls branch Sep 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.