From a98ebdff7a091fc4a05a5d3bf14b9e74d12a98ab Mon Sep 17 00:00:00 2001 From: Pavel Simovec Date: Mon, 30 Sep 2024 12:21:55 +0200 Subject: [PATCH] Enable gating & add simple gating test Resolves: RHEL-52114 --- .fmf/version | 1 + gating.yaml | 7 +++++++ gating/main.fmf | 7 +++++++ gating/test.sh | 39 +++++++++++++++++++++++++++++++++++++++ plans/main.fmf | 4 ++++ 5 files changed, 58 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 gating/main.fmf create mode 100755 gating/test.sh create mode 100644 plans/main.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..e840633 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy + +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/gating/main.fmf b/gating/main.fmf new file mode 100644 index 0000000..edfa88b --- /dev/null +++ b/gating/main.fmf @@ -0,0 +1,7 @@ +summary: Verify that FlexiBLAS swaps BLAS libraries by checking if OpenBLAS is considerably faster than Netlib +test: ./test.sh +require: + - python3-numpy + - flexiblas +duration: 5m + diff --git a/gating/test.sh b/gating/test.sh new file mode 100755 index 0000000..4ba51b7 --- /dev/null +++ b/gating/test.sh @@ -0,0 +1,39 @@ +#!/bin/sh -eux +# Test to verify that FlexiBLAS swaps BLAS libraries +# by checking if OpenBLAS is at least 3 times faster than Netlib BLAS + +PYTHON_SCRIPT=$(cat <= 3 * $openblas_time" | bc -l) )); then + echo "Test passed: OpenBLAS is at least 3 times faster than Netlib BLAS." + exit 0 +else + echo "Test failed: OpenBLAS is not at least 3 times faster than Netlib BLAS. Flexiblas might not have swapped the libraries." + exit 1 +fi + diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..e6427de --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,4 @@ +discover: + how: fmf +execute: + how: tmt