merge with master

This commit is contained in:
yqbk
2016-08-03 12:09:58 +02:00
77 changed files with 770 additions and 515 deletions

View File

@ -203,7 +203,7 @@ class DockerClient
execute_command(command, nil, block)
end
#only used by server sent events (deprecated?)
#only used by score
def execute_command(command, before_execution_block, output_consuming_block)
#tries ||= 0
@container = DockerContainerPool.get_container(@execution_environment)

View File

@ -1,6 +1,7 @@
class PyUnitAdapter < TestingFrameworkAdapter
COUNT_REGEXP = /Ran (\d+) test/
FAILURES_REGEXP = /FAILED \(failures=(\d+)\)/
FAILURES_REGEXP = /FAILED \(.*failures=(\d+).*\)/
ERRORS_REGEXP = /FAILED \(.*errors=(\d+).*\)/
ASSERTION_ERROR_REGEXP = /AssertionError:\s(.*)/
def self.framework_name
@ -9,9 +10,11 @@ class PyUnitAdapter < TestingFrameworkAdapter
def parse_output(output)
count = COUNT_REGEXP.match(output[:stderr]).captures.first.to_i
matches = FAILURES_REGEXP.match(output[:stderr])
failed = matches ? matches.captures.try(:first).to_i : 0
error_matches = ASSERTION_ERROR_REGEXP.match(output[:stderr]).try(:captures) || []
{count: count, failed: failed, error_messages: error_matches}
failures_matches = FAILURES_REGEXP.match(output[:stderr])
failed = failures_matches ? failures_matches.captures.try(:first).to_i : 0
error_matches = ERRORS_REGEXP.match(output[:stderr])
errors = error_matches ? error_matches.captures.try(:first).to_i : 0
assertion_error_matches = ASSERTION_ERROR_REGEXP.match(output[:stderr]).try(:captures) || []
{count: count, failed: failed + errors, error_messages: assertion_error_matches}
end
end