From f81a8a8224288aa424b9b7f96671c016e5bcc84a Mon Sep 17 00:00:00 2001 From: Honggang Li Date: Tue, 27 Jul 2021 03:10:50 -0400 Subject: [PATCH] Add gating test Related: rhbz#1947937 Signed-off-by: Honggang Li --- gating.yaml | 11 +++++++++++ tests/run_tests.sh | 10 ++++++++++ tests/sanity.sh | 15 +++++++++++++++ tests/tests.yml | 11 +++++++++++ 4 files changed, 47 insertions(+) create mode 100644 gating.yaml create mode 100755 tests/run_tests.sh create mode 100755 tests/sanity.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..f5ed0d0 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,11 @@ +--- !Policy + +product_versions: + + - rhel-9 + +decision_context: osci_compose_gate + +rules: + + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..11017ab --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# when running this in 1minutetip the PATH must be specified to execute +# in the local directory. +echo "Setting path to local directory" +PATH=$PATH:$(pwd) + +# simple sanity test +sanity.sh +exit $? diff --git a/tests/sanity.sh b/tests/sanity.sh new file mode 100755 index 0000000..2190199 --- /dev/null +++ b/tests/sanity.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# This is a simple sanity test to satisfy the RHEL8.1 onboard gating +# requirement. + +ib_atomic_bw --version +ret=$? + +# for reasons I have not investigated, at least on hosts without any rdma +# hardware, the above returns 1 instead of 0 (as does --help) +if [ "$ret" -eq 1 ]; then + exit 0 +fi + +exit $ret diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..813603d --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,11 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder + run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test + required_packages: + - perftest