From e36663000c99f5ced1306e9bf0f88122df864d5d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 14 Jun 2022 18:09:24 +0800 Subject: [PATCH] add gating and CI test Resolves: #2066184 forward-port from rhel8/backport from rawhide gating.yaml was created by Alexandra Fedorova in !1 --- gating.yaml | 6 ++++++ tests/parse/test.py | 16 ++++++++++++++++ tests/tests.yml | 13 +++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 gating.yaml create mode 100644 tests/parse/test.py create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/parse/test.py b/tests/parse/test.py new file mode 100644 index 0000000..b833ab7 --- /dev/null +++ b/tests/parse/test.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +codepoints = 0 + +file = '/usr/share/unicode/ucd/UnicodeData.txt' + +with open(file, mode='rt', encoding='utf-8') as unicode_data: + for line in unicode_data.readlines(): + codepoint_string, name, category = line.split(';')[:3] + codepoint = int(codepoint_string, 16) + char = chr(codepoint) + codepoints = codepoints + 1 + +print(codepoints) +# Unicode 13 has 33797 +assert(codepoints > 33000) diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..1a3ca0e --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-basic + required_packages: + - unicode-ucd + - python3 + tests: + - parse: + run: python3 test.py +...