return error code if there are failed tests in the CLI mode