[PATCH 1/3] autodetect Ruby packages

Martin Pitt mpitt at debian.org
Mon Sep 8 08:35:28 UTC 2014


Hey Antonio,

thanks for this! I cleaned up the patch a bit (use allow-stderr
instead of 2>&1, move the code into the "Debian" part of the file,
make them private functions, add docstrings, clean up test, etc.).
Attached FYI.

However, while the unit test works, I can't actually get this to work for two
random ruby packages that I picked:

| $ cat debian/ruby-tests.rb
| require "spec/rc4_spec.rb"
|
| $ ./run-from-checkout ruby-rc4 --- schroot sid
| dt-run [10:29:13]: test auto-gem2deb: [-----------------------
| mv lib .gem2deb.lib
| Running tests for ruby2.1 using debian/ruby-tests.rb...
| /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- spec/rc4_spec.rb (LoadError)
| 	from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
| 	from debian/ruby-tests.rb:1:in `<main>'
| mv .gem2deb.lib lib
| adt-run [10:29:13]: test auto-gem2deb: -----------------------]
| adt-run [10:29:13]: test auto-gem2deb:  - - - - - - - - - - results - - - - - - - - - -
| auto-gem2deb         FAIL non-zero exit status 1
|

Another one:

| $ cat debian/ruby-test-files.yaml
| ---
| - test/test_empty.rb
| - test/test_generator.rb
| - test/test_parser.rb
| - test/test_parser_hard.rb
| - test/test_table_arrays.rb
|
| $ ./run-from-checkout ruby-toml --- schroot sid
| adt-run [10:32:30]: test auto-gem2deb: gem2deb-test-runner --autopkgtest
| adt-run [10:32:30]: test auto-gem2deb: [-----------------------
| mv lib .gem2deb.lib
| Running tests for ruby2.1 with test file list from debian/ruby-test-files.yaml ...
| /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- test/test_empty.rb (LoadError)
| 	from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
| 	from -e:1:in `block in <main>'
| 	from -e:1:in `each'
| 	from -e:1:in `<main>'
| mv .gem2deb.lib lib
| adt-run [10:32:31]: test auto-gem2deb: -----------------------]
| adt-run [10:32:31]: test auto-gem2deb:  - - - - - - - - - - results - - - - - - - - - -
| auto-gem2deb         FAIL non-zero exit status 1

Note that this happens with your original patch too, so I don't think
I broke this with my modifications. Does this perhaps need some
additional $RUBY_PATH or similar? Or does this depend on fixes in
gem2deb-test-runner which aren't in sid yet?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Synthesize-Ruby-test-control.patch
Type: text/x-diff
Size: 3512 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20140908/8504e345/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20140908/8504e345/attachment.sig>


More information about the autopkgtest-devel mailing list