crs4 / pydoop

A Python MapReduce and HDFS API for Hadoop
Apache License 2.0
237 stars 59 forks source link

Early exit in shell scripts #231

Open simleo opened 7 years ago

simleo commented 7 years ago

Most (probably all) shell scripts should exit as soon as a command fails, most notably examples/run_all. Check all shell scripts and use set -e as appropriate.

ilveroluca commented 7 years ago

For run_all, one could argue against that. If one example fails to run (potentially because of a bug) the others may still work.

simleo commented 7 years ago

We are currently using it as an integration test, part of the Travis build, where the question is "is everything OK?". In this case it's better to have the "no" answer ASAP. OTOH, being able to answer "how many examples are working?" is also useful. We can make the early exit behavior optional so that it can be set according to the intended usage.