Project

Profile

Help

« Previous | Next » 

Revision 740ee2ac

Added by Ichimonji10 almost 3 years ago

Detect more types of errors, and save time

Detect more types of errors, and save time

.travis/script.sh runs unit tests and functional tests. Unfortunately, it only fails when certain expressions fail. For example, if pulp-manager migrate --noinput fails, then the script as a whole will (eventually) return non-zero, but if the prior pulp-manager migrate auth --noinput expression fails, then the script as a whole might return zero. This means that some types of errors won't be discovered.

This script also continues executing even when failures are detected early on. For example, if the migrations command fails, then the script will continue on and attempt to run unit tests and functional tests. This is a waste of time. Why bother running any tests at all if the migrations have failed?

This script also catches non-zero exit codes and re-raises them as "1". This is problematic, because a script's exact exit code can be very meaningful, and raising "1" hides this information.

Make the script bail out with the underlying return code when most kinds of errors are detected. This makes the test script catch more types of errors, saves time, and provides more debugging information.