1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-16 21:07:22 +00:00
os-autoinst-distri-fedora/tests/_collect_data.pm
Adam Williamson 65cadb11df Collect some data on freshly-installed systems after some tests
Summary:
I've been wanting to do this for a while; I think it'll let us
check for some significant changes between composes. This should
cause runs of a few test cases to collect and upload info on:

* installed packages
* free memory
* disk space
* active services
* 1 minute of CPU usage info (via top)

immediately after install and initial login. In some cases this
will be useful / interesting simply to look at directly, but
we can also have check-compose analyze the data and include
significant changes in its reports.

Test Plan:
Run affected tests, make sure the data collection
works.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1046
2016-11-09 07:20:17 -08:00

31 lines
971 B
Perl

use base "installedtest";
use strict;
use testapi;
sub run {
my $self = shift;
$self->root_console(tty=>3);
assert_script_run 'rpm -qa --queryformat "%{NAME}\n" | sort -u > /var/tmp/rpms.log';
upload_logs '/var/tmp/rpms.log';
assert_script_run 'free > /var/tmp/free.log';
upload_logs '/var/tmp/free.log';
assert_script_run 'df > /var/tmp/df.log';
upload_logs '/var/tmp/df.log';
assert_script_run 'systemctl -t service --no-pager |grep -o ".*\.service" > /var/tmp/services.log';
upload_logs '/var/tmp/services.log';
assert_script_run 'top -i -n20 -b > /var/tmp/top.log';
upload_logs '/var/tmp/top.log';
}
sub test_flags {
# without anything - rollback to 'lastgood' snapshot if failed
# 'fatal' - whole test suite is in danger if this fails
# 'milestone' - after this test succeeds, update 'lastgood'
# 'important' - if this fails, set the overall state to 'fail'
return {};
}
1;
# vim: set sw=4 et: