Migrate to TMT-style gating in C9S
This is required for RHIVOS, see VROOM-23635.
This commit is contained in:
parent
045bde2d08
commit
7e82651f27
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
@ -3,4 +3,4 @@ product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
||||
|
15
plans/tier1-internal.fmf
Normal file
15
plans/tier1-internal.fmf
Normal file
@ -0,0 +1,15 @@
|
||||
summary: Internal gating tests plan
|
||||
discover:
|
||||
- name: Internal gating tests (util-linux)
|
||||
how: fmf
|
||||
filter: 'tag: CI-Tier-1'
|
||||
url: https://pkgs.devel.redhat.com/git/tests/util-linux
|
||||
- name: Internal gating tests (util-linux-ng)
|
||||
how: fmf
|
||||
filter: 'tag: CI-Tier-1'
|
||||
url: https://pkgs.devel.redhat.com/git/tests/util-linux-ng
|
||||
execute:
|
||||
how: tmt
|
||||
adjust:
|
||||
enabled: false
|
||||
when: distro == centos-stream or distro == fedora
|
@ -1,57 +0,0 @@
|
||||
# Test which run in classic and docker environemnt
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
- container
|
||||
- atomic
|
||||
vars:
|
||||
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
|
||||
tenv_workdir: /var/test
|
||||
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-beakerlib
|
||||
tests:
|
||||
- various
|
||||
required_packages:
|
||||
- util-linux
|
||||
- util-linux-user
|
||||
- role: standard-test-basic
|
||||
required_packages:
|
||||
- util-linux
|
||||
- util-linux-user
|
||||
- coreutils
|
||||
- bzip2
|
||||
- xz
|
||||
- bc
|
||||
- device-mapper
|
||||
- iproute
|
||||
- mdadm
|
||||
- e2fsprogs
|
||||
- binutils
|
||||
- procps-ng
|
||||
- sed
|
||||
- gawk
|
||||
- file
|
||||
- git
|
||||
- rpm-build
|
||||
tests:
|
||||
- prepare-source:
|
||||
dir: ./
|
||||
run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source"
|
||||
- flatten-source:
|
||||
dir: ./
|
||||
run: shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
|
||||
- upstream:
|
||||
dir: upstream
|
||||
run: ./runtest.sh
|
@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2019 Karel Zak <kzak@redhat.com>
|
||||
|
||||
srcdir="../source"
|
||||
testdir="${srcdir}/tests"
|
||||
|
||||
echo "srcdir: $srcdir"
|
||||
echo "testdir: $testdir"
|
||||
|
||||
if [ ! -x "${testdir}/run.sh" ]; then
|
||||
echo "upstream tests not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We don't compile the tests, but it still needs some hints.
|
||||
#
|
||||
echo > ${srcdir}/config.h
|
||||
echo "#define HAVE_WIDECHAR 1" >> ${srcdir}/config.h
|
||||
echo "#define HAVE_LINUX_NET_NAMESPACE_H 1" >> ${srcdir}/config.h
|
||||
|
||||
# Remove stuff we don't have in RHEL
|
||||
#
|
||||
rm -rf ${testdir}/ts/misc/line
|
||||
|
||||
|
||||
version_tests=$(cat ${srcdir}/.version)
|
||||
version_system=$(rpm -q util-linux)
|
||||
|
||||
echo
|
||||
echo "Used versions: "
|
||||
echo " upstream tests: $version_tests"
|
||||
echo " installed util-linux: $version_system"
|
||||
echo
|
||||
|
||||
# Run upstream tests
|
||||
#
|
||||
${testdir}/run.sh --use-system-commands --noskip-commands --show-diff
|
||||
|
||||
exit $?
|
@ -1,64 +0,0 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/util-linux/various
|
||||
# Description: This test groups small sanity and regression tests for util-linux
|
||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2013 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=/CoreOS/util-linux/Sanity/various
|
||||
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: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: This test groups small sanity and regression tests for util-linux" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 10m" >> $(METADATA)
|
||||
@echo "RunFor: util-linux" >> $(METADATA)
|
||||
@echo "Requires: util-linux util-linux-user" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL3 -RHEL4 -RHEL5Server -RHEL5Client -RHEL6" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
@ -1,3 +0,0 @@
|
||||
PURPOSE of /CoreOS/util-linux/various
|
||||
Description: This test groups small sanity and regression tests for util-linux
|
||||
Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/util-linux/various
|
||||
# Description: This test groups small sanity and regression tests for util-linux
|
||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2013 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/bin/rhts-environment.sh || exit 1
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="util-linux"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "return code of chfn should be always 1 in case failure"
|
||||
rlRun "chfn -f a:b" 1
|
||||
rlRun "chfn -o a:b" 1
|
||||
rlRun "chfn -p a:b" 1
|
||||
rlRun "chfn -h a:b" 1
|
||||
rlRun "chfn -x a:b" 1
|
||||
rlRun "chfn -f a -o b -p c -h d unknown-user" 1
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user