enable CI gating
This commit is contained in:
parent
a4b9df0c98
commit
0f20ac28a8
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
20
gating.yaml
Normal file
20
gating.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_stable
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
6
plans/ci.fmf
Normal file
6
plans/ci.fmf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
summary: CI Gating Plan
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
directory: tests
|
||||||
|
execute:
|
||||||
|
how: beakerlib
|
66
tests/sanity_test/Makefile
Normal file
66
tests/sanity_test/Makefile
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /tools/tbb/Sanity/upstream
|
||||||
|
# Description: Test for package tbb that tests the whole library
|
||||||
|
# Author: Filip Holec <fholec@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/tools/tbb/Sanity/upstream
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Filip Holec <fholec@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Test for package tbb that tests the whole library" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 5m" >> $(METADATA)
|
||||||
|
@echo "RunFor: tbb" >> $(METADATA)
|
||||||
|
@echo "Requires: tbb tbb-devel rpm-build gcc-c++" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Bug: 844976" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
@echo "Architectures: x86_64 ppc64le aarch64 s390x" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
7
tests/sanity_test/PURPOSE
Normal file
7
tests/sanity_test/PURPOSE
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PURPOSE of /tools/tbb/Sanity/upstream
|
||||||
|
Description: Test for package tbb that tests the whole library
|
||||||
|
Author: Filip Holec <fholec@redhat.com>
|
||||||
|
Bug summary: [RFE] Provide tbb (dependency of suitesparse, SciPy)
|
||||||
|
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=844976
|
||||||
|
|
||||||
|
Test for package tbb that tests the whole library
|
19
tests/sanity_test/main.fmf
Normal file
19
tests/sanity_test/main.fmf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
summary: Test for package tbb that tests the whole library
|
||||||
|
description: |
|
||||||
|
Bug summary: [RFE] Provide tbb (dependency of suitesparse, SciPy)
|
||||||
|
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=844976
|
||||||
|
|
||||||
|
Test for package tbb that tests the whole library
|
||||||
|
contact: Filip Holec <fholec@redhat.com>
|
||||||
|
component:
|
||||||
|
- tbb
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
recommend:
|
||||||
|
- tbb
|
||||||
|
- tbb-devel
|
||||||
|
- rpm-build
|
||||||
|
- gcc-c++
|
||||||
|
duration: 5m
|
||||||
|
extra-summary: /tools/tbb/Sanity/upstream
|
||||||
|
extra-task: /tools/tbb/Sanity/upstream
|
106
tests/sanity_test/runtest.sh
Executable file
106
tests/sanity_test/runtest.sh
Executable file
@ -0,0 +1,106 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /tools/tbb/Sanity/upstream
|
||||||
|
# Description: Test for package tbb that tests the whole library
|
||||||
|
# Author: Filip Holec <fholec@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh
|
||||||
|
|
||||||
|
PACKAGES=${PACKAGES:-tbb}
|
||||||
|
REQUIRES=${REQUIRES:-tbb-devel}
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
# Determine what architecture is the test running on
|
||||||
|
ARCH=$(rlGetPrimaryArch)
|
||||||
|
|
||||||
|
# work around https://bugzilla.redhat.com/show_bug.cgi?id=1374681
|
||||||
|
sed -i 's/\/mnt\/redhat\/scripts\/rel-eng\/utility\/find_package/\/usr\/bin\/find_package/' /usr/share/beakerlib/plugins/rh-internal.sh
|
||||||
|
wget -O /usr/bin/find_package http://nfs.englab.brq.redhat.com/scratch/mcermak/conf/find_package
|
||||||
|
chmod a+rx /usr/bin/find_package
|
||||||
|
# Supported architectures are i386 and x86_64
|
||||||
|
if [ $ARCH = "i386" -o $ARCH="x86_64" ] ; then
|
||||||
|
# Check if RPMs are installed
|
||||||
|
rlAssertRpm --all
|
||||||
|
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
|
||||||
|
# Download tests from lookaside and decompress them
|
||||||
|
PY_COLLECTION=$(echo $COLLECTIONS | egrep -o 'python\w+')
|
||||||
|
if [[ -n $PY_COLLECTION ]] && rlIsRHEL 6
|
||||||
|
then
|
||||||
|
echo "${PY_COLLECTION}-tbb"
|
||||||
|
rlRun "rlFetchSrcForInstalled ${PY_COLLECTION}-tbb" \
|
||||||
|
0 "Download tbb source RPM"
|
||||||
|
|
||||||
|
if [ "$PY_COLLECTION" == "python27" ]
|
||||||
|
then
|
||||||
|
FLAGS="CXXFLAGS='-I/opt/rh/python27/root/usr/include/ -L/opt/rh/python27/root/usr/lib64'"
|
||||||
|
tbb_prefix="/tbb"
|
||||||
|
else
|
||||||
|
FLAGS="CXXFLAGS='-I/opt/rh/python33/root/usr/include/ -L/opt/rh/python33/root/usr/lib64'"
|
||||||
|
tbb_prefix=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
FLAGS=""
|
||||||
|
echo tbb
|
||||||
|
rlRun "rlFetchSrcForInstalled tbb" \
|
||||||
|
0 "Download tbb source RPM"
|
||||||
|
fi
|
||||||
|
rlRun "rpm --define '_topdir $TmpDir' -i *src.rpm" \
|
||||||
|
0 "Installing the source rpm"
|
||||||
|
rlRun "mkdir BUILD" 0 "Creating BUILD directory"
|
||||||
|
rlRun "rpmbuild --nodeps --define '_topdir $TmpDir' -bp $TmpDir/SPECS/*spec" \
|
||||||
|
0 "Preparing sources"
|
||||||
|
rlRun "pushd ./BUILD/" 0 "Go to source directory"
|
||||||
|
else
|
||||||
|
rlLog "tbb is not available for $ARCH, skipping the test"
|
||||||
|
fi
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
# Test if architecture is supported
|
||||||
|
if [ $ARCH = "i386" -o $ARCH="x86_64" ] ; then
|
||||||
|
# Make and make fibonacci
|
||||||
|
rlRun "pushd .${tbb_prefix}/oneTBB*/examples/test_all/fibonacci; make ${FLAGS}" 0 \
|
||||||
|
"Enter fibonacci example directory and make"
|
||||||
|
# Run the fibonacci test
|
||||||
|
rlRun "./fibonacci" 0 \
|
||||||
|
"Testing fibonacci (which is complex testing of nearly all tbb library)"
|
||||||
|
fi
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
# Test if architecture is supported
|
||||||
|
if [ $ARCH = "i386" -o $ARCH="x86_64" ] ; then
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
fi
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user