What | Removed | Added |
---|---|---|
CC | jreidinger@suse.com, mvidner@suse.com | |
Summary | YaST rspec tests do not give any hint to file that cannot be loaded | [yast2-ruby-bindings] YaST rspec tests do not give any hint to file that cannot be loaded |
(For the record, the current position of aschnell/master is https://github.com/aschnell/yast-snapper/tree/d27bd89fd6ce11d904f16f32f01d18d723e6793d >From there, remove the n option on src/modules/SnapperDbus.rb:48) The problem is that the yast component system eats the original exception: $ rspec test/*test.rb or $ rspec --backtrace test/*test.rb don't show it, but ~/.y2log does: 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Y2Ruby] binary/Y2RubyUtils.cc(y2_require):25 cannot require yast:/local/home-mvidner/svn/yast/snapper/src/modules/SnapperDbus.rb:51: invalid multibyte escape: /(\\|[\x80-\xff])/ at /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import_pure' 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Interpreter] yast/i18n.rb:133 Ruby::loadModule() / Can't load ruby module '/local/home-mvidner/svn/yast/snapper/src/modules/SnapperDbus' 2015-05-27 15:14:37 <5> mrakoplas.suse.cz(7869) [Y2Ruby] binary/YRubyNamespace.cc(YRubyNamespace):219 The Ruby module 'SnapperDbus' is not provided by its rb file 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Interpreter] yast/i18n.rb:133 No table associated to module 'SnapperDbus' 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Ruby] binary/Yast.cc(getNs):64 ruby call: Can't import namespace 'SnapperDbus' 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Y2Ruby] binary/Y2RubyUtils.cc(y2_require):25 cannot require yast:component cannot import namespace 'SnapperDbus' at /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import_pure' 2015-05-27 15:14:37 <3> mrakoplas.suse.cz(7869) [Interpreter] yast/i18n.rb:133 Ruby::loadModule() / Can't load ruby module '/local/home-mvidner/svn/yast/snapper/src/modules/Snapper' 2015-05-27 15:14:37 <1> mrakoplas.suse.cz(7869) [Y2Ruby] binary/YRuby.cc(~YRuby):107 Shutting down ruby interpreter. The problem is a combination of several problems. Compare: $ ruby -I src/modules/ -r SnapperDbus -e 1 /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': /local/home-mvidner/svn/yast/snapper/src/modules/SnapperDbus.rb:51: invalid multibyte escape: /(\\|[\x80-\xff])/ (SyntaxError) from /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' $ $ ruby -I src/modules/ -r yast -e 'Yast.import "SnapperDbus"' /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import_pure': component cannot import namespace 'SnapperDbus' (NameError) from /usr/lib64/ruby/vendor_ruby/2.1.0/yast/yast.rb:162:in `import' from -e:1:in `<main>' [actual exception in y2log] $ ruby -I src/modules/ -r yast -e 'Yast.import "Snapper"' [no error! but it has failed like you reported]