[DRE-maint] Bug#795664: Report on my efforts

Martín Ferrari tincho at tincho.org
Fri Sep 11 09:39:36 UTC 2015


Hi all,

I spent several hours yesterday fixing this bug, as it affects one of my
packages (prometheus).

I managed to fix this particular error, and it is simple: MiniTest::Test
should be replaced by MiniTest::Unit::TestCase (dquilt patch attached).

The problem I could not solve, is that during the tests, the code looks
for the handlebars.js file in an absolute path, which obviously fails if
this is run in a clean chroot. I could not find a way to set the
relative path properly, as I really don't understand Ruby.


RUBYLIB=/home/tincho/repos/prometheus/ruby-handlebars-assets/debian/ruby-handlebars-assets/usr/lib/ruby/vendor_ruby:.
rake2.1 -f debian/ruby-tests.rake
Run options: --seed 30204

# Running tests:

E.EEEEEEEEE.EEEE

Finished tests in 0.281625s, 56.8131 tests/s, 17.7541 assertions/s.

  1) Error:
HandlebarsAssets::CompilingTestx#test_patching_handlebars:
Errno::ENOENT: No such file or directory @ rb_sysopen -
/usr/share/ruby-handlebars-assets/vendor/assets/javascripts/handlebars.js

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`read'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`read'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`source'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:18:in
`append_patch'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:24:in
`block in apply_patches_to_source'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:23:in
`each'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:23:in
`apply_patches_to_source'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:31:in
`context'

/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:10:in
`precompile'

/home/tincho/repos/prometheus/ruby-handlebars-assets/test/handlebars_assets/compiling_test.rb:26:in
`test_patching_handlebars'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1265:in `run'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `block in _run_suites'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `map'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `_run_suites'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
    /usr/lib/ruby/2.1.0/minitest/unit.rb:802:in `block in autorun'


-- 
Martín Ferrari (Tincho)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bug#795664-Fix-tests.patch
Type: text/x-patch
Size: 1269 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20150911/10ff07df/attachment.bin>


More information about the Pkg-ruby-extras-maintainers mailing list