16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/dtr/base.rb', line 16
def run(server, client, test_files, signature)
test_files.each do |test_file|
logger.info { "\tRun #{test_file}..." }
unless File.exist?(test_file.untaint)
logger.info {"\tSkip test file not exists: #{test_file}"}
next
end
server_reports = server.reports
break unless server_reports
if server_reports[test_file]
logger.info {"\tSkip test file has report on server: #{test_file}"}
next
end
result = client.execute("ruby #{test_file}")
tests, assertions, failures, errors = parse(result[:stdout])
report = TestReport.new(test_file, result, tests, assertions, failures, errors)
logger.info { report.to_yaml } unless report.succeeded?
break unless server.update signature, report
end
end
|