[PATCH 1/3] autodetect Ruby packages

Antonio Terceiro terceiro at debian.org
Mon Sep 8 13:35:31 UTC 2014


On Mon, Sep 08, 2014 at 10:35:28AM +0200, Martin Pitt wrote:
> Hey Antonio,
> 
> thanks for this! I cleaned up the patch a bit (use allow-stderr
> instead of 2>&1,

I have thought about this and this redirection has its purpose: adt-run
separates stderr output from stdout what makes it rather difficult to
spot problems when needed, so the 2>&1 makes stderr and stdout to mix
"correctly" as one would see in a terminal when running the tests
manually. So for the Ruby tests, I would like to have stderr and stdout
properly interleaved.

Perhaps we should fix that in adt-run instead?

> 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?

Yes. This has already been addressed in gem2deb-test-runner:

http://anonscm.debian.org/cgit/pkg-ruby-extras/gem2deb.git/commit/?id=e5b817eb9f103edac1df4117833249a4aefbc777

That will be uploaded before we deploy these changes.

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- 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/5173be9f/attachment.sig>


More information about the autopkgtest-devel mailing list