Skip to content

Commit

Permalink
Enable logs upload for agama playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredi committed Aug 31, 2023
1 parent 674223d commit 7f6ae75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Yam/agama/agama_base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ sub post_fail_hook {
select_console 'root-console';
y2_base::save_upload_y2logs($self, skip_logs_investigation => 1);
save_and_upload_log('journalctl -u agama-auto', "/tmp/agama-auto-log.txt");
upload_traces();
}

sub post_run_hook {
Expand All @@ -35,4 +36,9 @@ sub test_flags {
return {fatal => 1};
}

sub upload_traces {
assert_script_run("tar czf /tmp/traces.tar.gz test-results/");
upload_logs("/tmp/traces.tar.gz");
}

1;
2 changes: 2 additions & 0 deletions tests/yam/agama/agama.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ use testapi qw(
);

sub run {
my $self = shift;
my $test = get_required_var('AGAMA_TEST');

assert_script_run("playwright test --trace on --project chromium --config /usr/share/e2e-agama-playwright tests/" . $test . ".spec.ts", timeout => 1200);
$self->upload_traces();
enter_cmd 'reboot';
}

Expand Down

0 comments on commit 7f6ae75

Please sign in to comment.