Skip to content

Commit

Permalink
Merge pull request #210 from b10n1k/fix_sporadic_tests
Browse files Browse the repository at this point in the history
Upload full openqa job testresults
  • Loading branch information
mergify[bot] authored Sep 16, 2024
2 parents ed67749 + 884dd8d commit 0b26439
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/openQAcoretest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ sub post_fail_hook ($self) {
sub test_flags { {fatal => 1} }

sub upload_openqa_logs {
get_log 'ps -ef' => 'running_processes.txt';
get_log 'journalctl --pager-end --no-tail --no-pager -u apache2 -u nginx -u openqa-scheduler -u openqa-websockets -u openqa-webui -u openqa-gru -u openqa-worker@1' => 'openqa_services.log.txt';
get_log 'journalctl --pager-end --no-tail --no-pager' => 'journal.log.txt';
my @logs = split m/\n/, script_output q{find /var/lib/openqa -name autoinst-log.txt};
@logs and get_log "(cat @logs ||:)" => 'autoinst-log.txt';
get_log '(find /var/lib/openqa/pool/ /var/lib/openqa/testresults/ ||:)' => 'find.txt';
assert_script_run 'tar -cvzf testresults.tar.gz /var/lib/openqa/testresults/';
upload_logs 'testresults.tar.gz';
get_log q|sudo -u geekotest /usr/share/openqa/script/openqa eval -V 'my $jobs = app->minion->jobs; my @r; while (my $j = $jobs->next) { push @r, $j->{result} }; \@r'| => 'openqa_minion_results.txt';
}

Expand Down

0 comments on commit 0b26439

Please sign in to comment.