From 953862ead52f1646848b23a3ae2396781bba2fe1 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Tue, 16 Jul 2024 12:58:27 -0400 Subject: [PATCH] Add mising tests directory for gating Resolves: RHEL-48237 Signed-off-by: John Kacur --- stress-ng.spec | 6 +++++- tests/scripts/run_tests.sh | 17 +++++++++++++++++ tests/tests.yml | 12 ++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tests/scripts/run_tests.sh create mode 100644 tests/tests.yml diff --git a/stress-ng.spec b/stress-ng.spec index 452858d..91c2802 100644 --- a/stress-ng.spec +++ b/stress-ng.spec @@ -1,6 +1,6 @@ Name: stress-ng Version: 0.17.08 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Stress test a computer system in various ways License: GPL-2.0-or-later @@ -53,6 +53,10 @@ install -pm 644 bash-completion/%{name} \ %{_datadir}/bash-completion/completions/%{name} %changelog +* Tue Jul 16 2024 John Kacur - 0.17.08-6 +- Add mising tests directory for gating +Resolves: RHEL-48237 + * Mon Jun 24 2024 Troy Dawson - 0.17.08-5 - Bump release for June 2024 mass rebuild diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100644 index 0000000..78042b6 --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,17 @@ +#!/usr/bin/bash +# make sure we have stress-ng installed +if rpm -q --quiet stress-ng; then + : +else + sudo dnf install -y stress-ng + if [[ $? != 0 ]]; then + echo "install of stress-ng failed!" + exit 1 + fi +fi + +# See if stress-ng is installed and executable +stress-ng --help 2>> /dev/null +if [[ $? != 0 ]]; then + exit 2 +fi diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..e01734e --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: scripts + run: ./run_tests.sh + required_packages: + - make + - stress-ng