From 5638dce0f39fdf2354d1b52e1c7efd650e7ff616 Mon Sep 17 00:00:00 2001 From: xiawu Date: Fri, 18 Jun 2021 13:00:21 +0800 Subject: [PATCH] Initial commit to enable RHEL-9 gating for kdump-ananconda-addon Resolves: rhbz1974221 Signed-off-by: xiawu --- gating.yaml | 6 ++++++ tests/runtest.sh | 17 +++++++++++++++++ tests/tests.yml | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 gating.yaml create mode 100755 tests/runtest.sh 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/runtest.sh b/tests/runtest.sh new file mode 100755 index 0000000..0f8c385 --- /dev/null +++ b/tests/runtest.sh @@ -0,0 +1,17 @@ +#!/bin/sh +TMPDIR="/var/tmp" +kdump_anaconda_addon_env="" +kdump_anaconda_addon_path="" + +# We do this because there is no pylint in RHEL +kdump_anaconda_addon_env=$(mktemp -p "$TMPDIR/" -d -t kdump-anaconda-addon-test.XXXXXX) +# Need to use anaconda package in RHEL, so let virtualenv access system site packages +virtualenv $kdump_anaconda_addon_env --system-site-packages +# Start it and install pylint +source $kdump_anaconda_addon_env/bin/activate +pip install --ignore-installed pylint + +# Run test +pushd source +make test +popd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..15aa6e5 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,20 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - make + - anaconda + - virtualenv + - python3-nose + tests: + - smoke: + dir: . + run: ./runtest.sh