From 425447b3fa1a723ac14158aaefbc3d7f26c15176 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 20 Sep 2021 14:58:56 +0100 Subject: [PATCH] Add gating tests for RHEL 9 --- gating.yaml | 6 ++++++ po4a.spec | 7 ++++++- tests/basic-test.sh | 39 +++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 13 +++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 gating.yaml create mode 100755 tests/basic-test.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..2c7ed80 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/po4a.spec b/po4a.spec index e2d2830..ac4d756 100644 --- a/po4a.spec +++ b/po4a.spec @@ -1,6 +1,6 @@ Name: po4a Version: 0.63 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tool maintaining translations anywhere License: GPL+ URL: https://po4a.org/ @@ -133,6 +133,11 @@ LANG=C.utf8 %{_mandir}/*/man7/po4a.7* %changelog +* Mon Sep 20 2021 Richard W.M. Jones - 0.63-4 +- Synchronize package with Fedora Rawhide +- Add gating tests for RHEL 9 + resolves: rhbz#1990062 + * Mon Aug 09 2021 Mohan Boddu - 0.63-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/tests/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..27d74db --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,39 @@ +#!/bin/bash - + +set -e +set -x + +po4a --help + +# Write a test POD (Perl doc) file to the local directory. +cat >test.pod < +EOF + +# Try to compile it into a POT file using po4a-gettextize: +po4a-gettextize -f pod -M utf-8 -L utf-8 \ + --package-name hello \ + --package-version 1.0 \ + --msgid-bugs-address noone@example.com \ + --copyright-holder "Red Hat Inc." \ + -p output.pot -m test.pod + +cat output.pot + +# Check for some expected strings in the output. +grep 'msgid "DESCRIPTION"' output.pot + +grep 'msgid "This is the hello world documentation"' output.pot + +# Clean up. +rm output.pot test.pod diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..0462057 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - bash + - coreutils + - grep + tests: + - simple: + dir: . + run: ./basic-test.sh