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/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 648918d..f7de446 100644 --- a/gating.yaml +++ b/gating.yaml @@ -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} diff --git a/plans/tier1-internal.fmf b/plans/tier1-internal.fmf new file mode 100644 index 0000000..9e6a127 --- /dev/null +++ b/plans/tier1-internal.fmf @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index e8f651e..0000000 --- a/tests/tests.yml +++ /dev/null @@ -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 diff --git a/tests/upstream/runtest.sh b/tests/upstream/runtest.sh deleted file mode 100755 index a6fbb9b..0000000 --- a/tests/upstream/runtest.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2019 Karel Zak - -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 $? diff --git a/tests/various/Makefile b/tests/various/Makefile deleted file mode 100644 index 2357934..0000000 --- a/tests/various/Makefile +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 " > $(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) diff --git a/tests/various/PURPOSE b/tests/various/PURPOSE deleted file mode 100644 index b4de79a..0000000 --- a/tests/various/PURPOSE +++ /dev/null @@ -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 diff --git a/tests/various/runtest.sh b/tests/various/runtest.sh deleted file mode 100755 index 32871f4..0000000 --- a/tests/various/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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