From c2eae8623a8a940f947ccb0a7772b2d51d58d978 Mon Sep 17 00:00:00 2001 From: Jonathan Rivrain Date: Thu, 4 May 2023 18:17:09 +0200 Subject: [PATCH] Recover only yast logs in Agama auto-install See https://progress.opensuse.org/issues/128489 Adding a post_fail_hook directly in the module to use the default installer password and just upload y2logs, as it seems like there is nothing that does only that in the libs. --- lib/yam/agama/agama_base.pm | 20 ++++++++++++++++++++ tests/yam/agama/auto.pm | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/yam/agama/agama_base.pm diff --git a/lib/yam/agama/agama_base.pm b/lib/yam/agama/agama_base.pm new file mode 100644 index 000000000000..95f8a427310e --- /dev/null +++ b/lib/yam/agama/agama_base.pm @@ -0,0 +1,20 @@ +## Copyright 2023 SUSE LLC +# SPDX-License-Identifier: GPL-2.0-or-later + +# Summary: base class for Agama tests +# Maintainer: QE YaST and Migration (QE Yam) + +package yam::agama::agama_base; +use base 'opensusebasetest'; +use strict; +use warnings; +use testapi 'select_console'; +use y2_base 'save_upload_y2logs'; + +sub post_fail_hook { + $testapi::password = 'linux'; + select_console 'root-console'; + y2_base::save_upload_y2logs; +} + +1; diff --git a/tests/yam/agama/auto.pm b/tests/yam/agama/auto.pm index 8174f1f31e43..5a35d99d14b7 100644 --- a/tests/yam/agama/auto.pm +++ b/tests/yam/agama/auto.pm @@ -4,7 +4,7 @@ # Summary: First installation using D-Installer current CLI (only for development purpose) # Maintainer: QE YaST and Migration (QE Yam) -use base 'y2_installbase'; +use base yam::agama::agama_base; use strict; use warnings;