Skip to content

Commit

Permalink
Add test module for man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvid committed Mar 19, 2024
1 parent eb38006 commit e65a0f7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test-spec:
tools/update_spec --check

.PHONY: test-static
test-static: tidy-check test-yaml-valid test-modules-in-yaml-schedule test-merge test-dry test-no-wait_idle test-deleted-renamed-referenced-files test-unused-modules-changed test-soft_failure-no-reference test-spec test-invalid-syntax test-code-style test-metadata test_pod_whitespace_rule test_pod_errors test-console-based-modules
test-static: tidy-check test-yaml-valid test-modules-in-yaml-schedule test-merge test-dry test-no-wait_idle test-deleted-renamed-referenced-files test-unused-modules-changed test-soft_failure-no-reference test-spec test-invalid-syntax test-code-style test-metadata test_pod_whitespace_rule test_pod_errors

.PHONY: test
ifeq ($(TESTS),compile)
Expand Down Expand Up @@ -160,7 +160,3 @@ test-code-style:
.PHONY: test-isotovideo
test-isotovideo:
tools/test_isotovideo

.PHONY: test-console-based-modules
test-console-based-modules:
@! git --no-pager grep --files-with-matches -E 'use base ("|\')consoletest' "*tests/*.pm" | xargs grep -q 'assert_screen'
1 change: 1 addition & 0 deletions schedule/functional/extra_tests_textmode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ schedule:
- console/prepare_test_data
- console/consoletest_setup
- '{{update_repos}}'
- console/man_pages
- console/ping
- console/orphaned_packages_check
- console/zypper_lr_validate
Expand Down
1 change: 1 addition & 0 deletions schedule/qam/common/mau-extratests1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ schedule:
- console/consoletest_setup
- console/check_os_release
- console/ping
- console/man_pages
- console/openvswitch
- console/pam
- console/sshd
Expand Down
27 changes: 27 additions & 0 deletions tests/console/man_pages.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SUSE's openQA tests
#
# Copyright SUSE LLC
# SPDX-License-Identifier: FSFAP

# Package: man-pages
# Summary: Basic functional test for man-pages
# Maintainer: QE Core <qe-core@suse.de>

use base 'consoletest';
use testapi;
use serial_terminal 'select_serial_terminal';
use strict;
use warnings;
use utils 'zypper_call';

sub run {
my ($self) = @_;
select_serial_terminal;

zypper_call 'in man-pages man';
assert_script_run 'man --version';
assert_script_run 'man man > man_man.txt';
assert_script_run 'grep -q "Manual pager utils" man_man.txt';
}

1;
5 changes: 0 additions & 5 deletions tests/test.pm

This file was deleted.

0 comments on commit e65a0f7

Please sign in to comment.