the script portion of travis yml file looks this:
script: - ./run_tests.sh
the script runs tests on sauce labs. if script fails due test failures, still exits code 0 , build continues on pass well. why doesn't script exit failure code if test fails?
when output exit code end of script file, 0. when output exit code in .travis.yml file after script command, 1:
echo $? 0 command "./run_tests.sh" exited 0. $ echo $? 1
i realized because i'm running tests using unittest.texttestrunner, , exit code tests 0 unless catch test failures , exit based on them:
ret = not runner.run(test_suite).wassuccessful() sys.exit(ret)
Comments
Post a Comment