memkind: add gating for centos-stream-10

Resolves: RHELMISC-4150

Signed-off-by: Rafael Aquini <aquini@redhat.com>
This commit is contained in:
Rafael Aquini 2024-05-23 15:37:28 -04:00
parent f5e40db2b3
commit d4129006c8
5 changed files with 84 additions and 0 deletions

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

9
tests/memkind-prepsource.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash -x
WORKDIR="${1}"
rpmbuild -bp $WORKDIR/*.spec --nodeps --define "_sourcedir $WORKDIR" --define "_builddir $WORKDIR/source"
mkdir $WORKDIR/temp
mv $WORKDIR/source/*/* $WORKDIR/temp/
rm -rf $WORKDIR/source/*
mv $WORKDIR/temp/* $WORKDIR/source/

26
tests/memkind-test.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
RETCODE=0
TMPTESTSFILE=/tmp/memkind-tests.log
TMPBUILDFILE=/tmp/memkind-build.log
# re-play the build
pushd source
./build.sh &> $TMPBUILDFILE
RETCODE=$?
if [ $RETCODE != 0 ]; then
cat $TMPBUILDFILE
exit $RETCODE
fi
pushd test
# run all tests filtering out those that are not meant
# to pass on a small VM
./all_tests --gtest_filter=-BATest.test_TC_MEMKIND_hbwmalloc_Pref_CheckAvailable:DlopenTest.*:HbwVerifyFunctionTest.*:NegativeTestHuge.test_TC_MEMKIND_hbwmalloc_memalign_psize_Interleave_Policy_PAGE_SIZE_2MB:HBW*.*:BATest.test_TC_MEMKIND_free_ext_MEMKIND_GBTLB_4096_bytes &> $TMPTESTSFILE
RETCODE=$?
if [ $RETCODE != 0 ]; then
cat $TMPTESTSFILE
fi
exit $RETCODE

5
tests/provision.fmf Normal file
View File

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
m: 4G

38
tests/tests.yml Normal file
View File

@ -0,0 +1,38 @@
---
- hosts: localhost
tags:
- classic
vars:
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
tenv_workdir: /var/str
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
- name: Copy files including source to test environment
synchronize:
src: "{{ playbook_dir }}/.."
dest: "{{ tenv_workdir }}"
mode: push
ssh_args: "-o UserKnownHostsFile=/dev/null"
roles:
- role: standard-test-basic
required_packages:
- automake
- libtool
- numactl-devel
- systemd
- gcc
- gcc-c++
- make
- gawk
- python3
- rpm-build
tests:
- prepare-source:
dir: ./
run: ./memkind-prepsource.sh "{{tenv_workdir}}"
- memkind_test:
dir: ./
run: ./memkind-test.sh