[DRE-maint] Bug#797972: add sprockets tests for rails engines

Pirate Praveen praveen at onenetbeyond.org
Wed Sep 16 21:11:17 UTC 2015


On Thursday 17 September 2015 01:41 AM, Pirate Praveen wrote:
> 
> I have tried to implement it in gem2deb-testrunner (smoke-test branch
> of gem2deb)
> 
> http://anonscm.debian.org/cgit/pkg-ruby-extras/gem2deb.git/commit/?h=smoke-test&id=c4ccfad2fc3962b2cecea96a51206e469d6a8853
> 
> Can someone review it? May be using sprockets directly is better, but
> I could not get that to work. I thought a heavier test is better than
> no test.
> 

Comments from terceiro on irc:

(01:36:30  IST) j4v4m4n: terceiro: can you review smoke-test branch in
gem2deb?
(01:45:01  IST) terceiro: j4v4m4n: that's completely specific to rails
assets packages, but uses a very generic name
(01:45:18  IST) terceiro: is there a good reason to not add a new binary
(01:45:27  IST) terceiro: also, please fix the indentation
(01:45:47  IST) terceiro: (no tabs please)
(01:46:16  IST) terceiro: does it *need* to be a full blown rails app
every time?
(01:46:26  IST) terceiro: this will add a significant burden on the test
dependencies
(01:47:30  IST) terceiro: also: if `rails new foo` fails, `bundle exec
ANYTHING` will also fail
(01:49:02  IST) terceiro: and the way your code is written the test will
always pass even if everything blows up
(01:50:21  IST) j4v4m4n: adt-run fails when running rails new foo, even
though the command is successful because for some find errors
(01:50:47  IST) j4v4m4n: same errors in assets precompile step too
(01:51:18  IST) j4v4m4n: I could not get it to work with just sprockets
(01:51:37  IST) j4v4m4n: if anyone can help with that, I can remove the
full app step
(01:53:12  IST) j4v4m4n: if a new binary is better I can create it, but
I thought it is similar to check-dependencies though only for a subset
of the gems
(01:56:36  IST) j4v4m4n: terceiro: find: `./*': No such file or
directory in rails new foo makes adt-run to always fail
(01:57:23  IST) j4v4m4n: redirecting to /dev/null is a temporary hack
until I can fix it properly

(02:00:24  IST) terceiro: adt-run will fail by default if there is
anything in stderr
(02:00:40  IST) terceiro: you have to declare ignore-stderr in
Restrictions: if you expect that
(02:00:58  IST) terceiro: but my point is your code will always pass
regardless because you are not checking the result of the commands
(02:03:37  IST) j4v4m4n: I will add checks for exit status
(02:05:54  IST) terceiro: with so many shell commands I wonder if won't
be easier to write a shell script instead
(02:06:08  IST) terceiro: with `set -e`
(02:07:14  IST) j4v4m4n: ok I will make it a shell script as separate binary
(02:07:57  IST) j4v4m4n: gem2deb-assets-test?
(02:08:50  IST) terceiro: gem2deb-test-assets-package ?
(02:09:09  IST) terceiro: taking the gem name as $1, I gues
(02:09:12  IST) terceiro: I guess
(02:09:42  IST) j4v4m4n: terceiro: can you help with running sprockets
directly?
(02:10:05  IST) j4v4m4n: I tried many options but could not get it to work
(02:14:00  IST) terceiro: do you have any assets package that is not
rails-specific?
(02:17:33  IST) j4v4m4n: all of them are rails afaict
(02:17:57  IST) j4v4m4n: I will make it gem2deb-test-assets-package
(02:22:43  IST) terceiro: use rails apps, then
(02:23:50  IST) j4v4m4n: ok

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20150917/683088ad/attachment.sig>


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