Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Back when I worked on mod_pagespeed we wrote shell scripts for our end-to-end tests. This was expedient when getting started, but then we just kept using it long past when we should have switched away. At one point I got buy-in for switching to python, but (inexperience) I thought the right way to do it was to build up a parallel set of tests in python and then switch over once everything had been ported. This, of course, didn't work out. If I were doing this now I'd do it incrementally, since there's no reason you can't have a mix of shell and python during the transition.

I count 10k lines of hand-written bash in the system tests:

    $ git clone git@github.com:apache/incubator-pagespeed-mod.git
    $ git clone git@github.com:apache/incubator-pagespeed-ngx.git
    $ find incubator-pagespeed-* | \
         grep sh$ | \
         grep system_test | \
         xargs cat | \
         wc -l
    10579


lines ending in | do not require \


Thanks for the tip!

(I'm very conflicted about learning new things that make shell more convenient: I don't need more things pushing me toward using this in-many-ways-horrible-but-I'm-so-fast-with-it tool.)



I (also?) never new this; thanks.

My old finger memory will still probably put them in, alas.


In my experience they do. Could it be related to strict bash mode?


dunno. give some evidence.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: