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 15, 2024
1 parent eb38006 commit 61c3ee8
Show file tree
Hide file tree
Showing 5 changed files with 42 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 lib/main_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,7 @@ sub load_extra_tests_console {
loadtest 'console/python_scientific' unless (is_sle("<15"));
loadtest "console/parsec" if is_tumbleweed;
loadtest "console/perl_bootloader" unless (get_var('PUBLIC_CLOUD') || is_bootloader_sdboot);
loadtest "console/man_pages.pm";
}

sub load_extra_tests_sdk {
Expand Down
11 changes: 11 additions & 0 deletions schedule/qam/common/mau-manpages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: mau-man-pages
description: >
man-pages test
https://progress.opensuse.org/issues/156424
schedule:
- installation/bootloader_start
- boot/boot_to_desktop
- console/system_prepare
- console/consoletest_setup
- console/man_pages
29 changes: 29 additions & 0 deletions tests/console/man_pages.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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;

if (script_run 'rpm -q man-pages man') {
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 61c3ee8

Please sign in to comment.