From a81c9d745e11160588caca1a40192c400dcd2419 Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Wed, 20 Nov 2024 13:33:52 -0500 Subject: [PATCH] Adding gating tests Resolves: RHEL-67993 Signed-off-by: Kamal Heib --- gating.yaml | 11 +++++++++++ tests/run_tests.sh | 10 ++++++++++ tests/sanity.sh | 17 +++++++++++++++++ tests/tests.yml | 12 ++++++++++++ 4 files changed, 50 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..481b4b7 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,11 @@ +--- !Policy + +product_versions: + + - rhel-10 + +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..55c3d31 --- /dev/null +++ b/tests/sanity.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# This is a simple sanity test to satisfy the RHEL8.1 onboard gating +# requirement. + +ret=$? +source /etc/profile.d/modules.sh + +module load mpi/mpich-x86_64 + +mpichversion +let ret=$ret+$? + +mpirun hostname +let ret=$ret+$? + +exit $ret diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..c2d22d6 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- 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: + - environment-modules + - mpich