Assert the build outcome

 @param [Boolean] success True if the build should succeed
 @param [Array] warnings The warnings expected
5006
def assert_build_result(success, warnings)
      success ? assert_no_error_occurred : assert_error_occurred
      warnings.each do |code|
        expect_warning(code, :warning_only => true)
      end
    end
661244
def is_successful(self, retry=False):
        

        if not self.is_terminated(retry=retry):
            return False
        retry_num = options.retry_times
        while retry_num > 0:
            try:
                statuses = self.get_task_statuses()
                return all(task.status == Instance.Task.TaskStatus.SUCCESS
                           for task in statuses.values())
            except (errors.InternalServerError, errors.RequestTimeTooSkewed):
                retry_num -= 1
                if not retry or retry_num <= 0:
                    raise
838606
function onError (err) {
  console.error(chalk.red('✗ error:'), chalk.red(err.message))
  notifier.notify({
    title: 'Build failed:',
    message: err.message
  })
  this.emit('end')

  // When running without watch, process.exit(1) on error
  if (!watchifyEnabled) {
    process.exit(1)
  }
}
741248
def perfect_build
      is_perfect_build = @warning_count == 0 && @error_count == 0 && @test_failures_count == 0
      if post_messages
          message = Array.new
          message.push (@build_title) unless @build_title.nil?
          message.push ("Perfect build 👍🏻")
          message(message.reject(&:empty?).join(" ")) if is_perfect_build
      end
      return is_perfect_build
    end
283772
def process_failure(result) #:nodoc:
      if @failure_callback
        @failure_callback.call(message, result)
      else
        failure(result)
      end
    rescue Exception
      Beetle::reraise_expectation_errors!
    end
746531
def check_valid_rx_can_msg(result):
    
    return (result.value == ReturnCode.SUCCESSFUL) or (result.value > ReturnCode.WARNING)
446191
function _success(test, result) {
  process.stdout.write('.'.green);
  successes.push({ test: test, result: result });
}
41125
public void setWarnings(String warnings) {
        try {
            deprecationWarnings = CompilerOptions.DeprecationWarnings
                    .fromString(warnings);
        } catch (IllegalArgumentException e) {
            throw new BuildException("invalid value for warnings: " + warnings);
        }
    }
145607
def confirm(bool, &block)
      blk = "lambda { #{bool} }"
      
      self.send_remote(:add_listener, :confirm) { blk }
      block.call
      self.send_remote(:remove_listener, :confirm, lambda {blk})
    end
690215
def observe(self, success, failure):
        '''
        

        '''
        if isinstance(success, int) is False:
            if isinstance(success, float) is False:
                raise TypeError()
        if isinstance(failure, int) is False:
            if isinstance(failure, float) is False:
                raise TypeError()

        if success <= 0:
            raise ValueError()
        if failure <= 0:
            raise ValueError()

        self.__success += success
        self.__failure += failure
115216
public function confirmToProceed($warning = 'Application In Production!', $callback = null)
    {
        $callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback;

        $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback;

        if ($shouldConfirm) {
            if ($this->option('force')) {
                return true;
            }

            $this->alert($warning);

            $confirmed = $this->confirm('Do you really wish to run this command?');

            if (! $confirmed) {
                $this->comment('Command Cancelled!');

                return false;
            }
        }

        return true;
    }
1370234
def action_parse_results(result):
    
    passed = True
    for test, result in result.items():
        if result['success']:
            hookenv.action_set({test: 'PASS'})
        else:
            hookenv.action_set({test: 'FAIL - {}'.format(result['message'])})
            passed = False
    if not passed:
        hookenv.action_fail("One or more tests failed")
    return 0 if passed else 1
834125
def failure(*conditions, &effect)
      branch = Fear.case(Fear::Failure, &FAILURE_EXTRACTOR).and_then(Fear.case(*conditions, &effect))
      or_else(branch)
    end
582263
function (attrs) {
        attrs.messageFormatter = exceptionFormatter.message
        attrs.stackFormatter = exceptionFormatter.stack

        return buildExpectationResult(attrs)
      }
354162
def on_success(&block)
      on do |_, value, reason|
        block.call(value) unless reason
      end
    end
4988
def on_success(self, fn, *args, **kwargs):
        

        self._callbacks.append((fn, args, kwargs))

        result = self._resulted_in
        if result is not _NOTHING_YET:
            self._succeed(result=result)
1329539
def success(self):
        
        return self.ack.upper() in (self.config.ACK_SUCCESS,
                                    self.config.ACK_SUCCESS_WITH_WARNING)