Include verifier stdout in non-Accepted results
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon.pm
index 9caa7dc..31e0398 100644 (file)
@@ -9,6 +9,7 @@ our $VERSION = '5999.000_004';
 use Gruntmaster::Daemon::Constants qw/ERR/;
 use Gruntmaster::Daemon::Format qw/prepare_files stopvms/;
 
+use File::Slurp qw/read_file/;
 use File::Temp qw/tempdir/;
 use JSON qw/decode_json encode_json/;
 use Sys::Hostname qw/hostname/;
@@ -63,6 +64,7 @@ sub process{
                for my $test (1 .. $testcnt) {
                        my $start_time = time;
                        my $result;
+                       unlink 'result';
                        try {
                                $generator->($test, $meta);
                                $result = $runner->($test, $meta);
@@ -75,8 +77,10 @@ sub process{
                        };
 
                        if (ref $result) {
-                               get_logger->trace("Test $test result is " . $result->[1]);
-                               push @full_results, {id => $test, result => $result->[0], result_text => $result->[1], time => time - $start_time}
+                               my $result_text = $result->[1];
+                               $result_text .= ': ' . read_file 'result' if -s 'result';
+                               get_logger->trace("Test $test result is " . $result_text);
+                               push @full_results, {id => $test, result => $result->[0], result_text => $result_text, time => time - $start_time}
                        } else {
                                get_logger->trace("Test $test result is $result");
                                push @full_results, {id => $test, result => 0, result_text => $result, time => time - $start_time}
This page took 0.025681 seconds and 4 git commands to generate.