exit codes for run_tests: 0 = success, 1 = warning, 2 = failure, 3 = error.
run_tests: added options --retry and --wait (to keep retrying tests if there is any problem).