From 3dbfbb456a57b71c6ba26184776e6f33a4b6092b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 3 Aug 2022 17:34:53 +0100 Subject: [PATCH] Add gating tests for RHEL 9 https://bugzilla.redhat.com/show_bug.cgi?id=1990052 --- .gitignore | 1 + gating.yaml | 6 ++++++ tests/basic-test.sh | 19 +++++++++++++++++++ tests/tests.yml | 12 ++++++++++++ 4 files changed, 38 insertions(+) create mode 100755 gating.yaml create mode 100755 tests/basic-test.sh create mode 100755 tests/tests.yml diff --git a/.gitignore b/.gitignore index 0e4e29b..963ba8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +*~ /virt-p2v-*.tar.gz /virt-p2v-*.tar.gz.sig diff --git a/gating.yaml b/gating.yaml new file mode 100755 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/basic-test.sh b/tests/basic-test.sh new file mode 100755 index 0000000..02e44be --- /dev/null +++ b/tests/basic-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash - +set -e +set -x + +# This is a difficult package to test in gating because building the +# virt-p2v ISO requires virt-builder, and even if we run it, it +# doesn't prove anything useful. Doing a full P2V conversion is even +# more difficult (and requires virt-v2v which we are unlikely to +# have). So just check that the virt-p2v binary looks sane. +tmpdir="$( mktemp -d )" +cd "$tmpdir" +xzcat /usr/lib64/virt-p2v/virt-p2v.xz > virt-p2v +chmod +x virt-p2v +./virt-p2v --version +./virt-p2v --help +./virt-p2v --long-options +./virt-p2v --short-options +cd +rm -r "$tmpdir" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100755 index 0000000..9ae7bc3 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - coreutils + - virt-p2v + tests: + - simple: + dir: . + run: ./basic-test.sh