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/tests/sanity/Makefile b/tests/sanity/Makefile deleted file mode 100644 index 7753aca..0000000 --- a/tests/sanity/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Description: Gating test for ddiskit -# Author: Ziqian SUN (Zamir) -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2022 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. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -TOPLEVEL_NAMESPACE=kernel -PACKAGE_NAME=ddiskit -RELATIVE_PATH=general/ddiskit/gating - -export TESTVERSION=1.0 -export TEST=/$(TOPLEVEL_NAMESPACE)/$(RELATIVE_PATH) - -.PHONY: all install download clean - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - chmod a+x ./runtest.sh - -clean: - rm -f *~ *.rpm $(BUILT_FILES) - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @touch $(METADATA) - @echo "Owner: Ziqian SUN (Zamir) " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Description: ddiskit gating test">> $(METADATA) - @echo "TestTime: 90m" >> $(METADATA) - @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) - @echo "Requires: gcc kernel-devel ddiskit" >> $(METADATA) - @echo "RhtsRequires: " >> $(METADATA) diff --git a/tests/sanity/PURPOSE b/tests/sanity/PURPOSE deleted file mode 100644 index dbd5d23..0000000 --- a/tests/sanity/PURPOSE +++ /dev/null @@ -1 +0,0 @@ -Gating test for ddiskit diff --git a/tests/sanity/metadata b/tests/sanity/metadata deleted file mode 100644 index d8958b7..0000000 --- a/tests/sanity/metadata +++ /dev/null @@ -1,14 +0,0 @@ -[General] -name=ddiskit -owner= Ziqian SUN (Zamir) -description=Gating test for ddiskit -license=GPLv2 -confidential=no -destructive=no - -[restraint] -entry_point=make run -max_time=90m -dependencies=ddiskit -softDependencies=kernel-devel -repoRequires= diff --git a/tests/sanity/runtest.sh b/tests/sanity/runtest.sh deleted file mode 100755 index d7212fd..0000000 --- a/tests/sanity/runtest.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh for ddiskit gating test. -# Author: Ziqian SUN (Zamir) -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2022 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# 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, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -kerneltag=$(uname -r | sed "s/.$(uname -m)//g") -rhelrelease=$(rpm -q redhat-release | awk -F '-' '{print $3}' | awk -F '.' '{print $1}') -tmpdir=. - -rlJournalStart - rlPhaseStartSetup - rlRun -l "date" - rm -rf ${tmpdir}/ddiskit-test - rm -rf ${tmpdir}/kernel-rhel${rhelrelease} - rlRun -l "rpm -q ddiskit || dnf install -y -q ddiskit" - rlRun "dnf install -y -q git" - rlRun -l "git clone https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-${rhelrelease}.git" - rlRun -l "date" - rlPhaseEnd - rlPhaseStartTest "Test ddiskit prepare" - mkdir ${tmpdir}/ddiskit-test - pushd ${tmpdir}/ddiskit-test - - rlRun -l "ddiskit --help 2>&1 | tee -a ddiskit-help" - rlAssertNotGrep "invalid|error" ddiskit-help "-E -i" - rlRun -l "ddiskit -v -p rh-testing -C defaults.git_dir=../kernel-rhel${rhelrelease}/.git -C spec_file.module_name=virtio_blk -C spec_file.module_version=1.0.1_dup7.4a -C spec_file.rpm_dist=el${rhelrelease} -C spec_file.kernel_version=${kerneltag} -C spec_file.kernel_arch=$(arch) prepare_sources -d 'drivers/block drivers/ata'" - - rlRun "sed -i '/ENTER_VENDOR_NAME$/a module_vendor = redhat' module.config" - rlRun "sed -i '/ENTER_AUTHOR$/a module_author = Core Kernel QE' module.config" - rlRun "sed -i '/ENTER_AUTHOR_EMAIL$/a module_author_email = core-kernel-qe@redhat.com' module.config" - - rlRun -l "ddiskit -v -p rh-testing -C defaults.git_dir=../kernel-rhel${rhelrelease}/.git/ -C spec_file.make_targets=virtio_blk.ko build_rpm -s -G" - rlRun -l "rpm -qp --requires rpm/SRPMS/kmod-redhat-*.src.rpm | grep kernel-abi-stablelists" - rlRun "dnf builddep -y -q rpm/SRPMS/kmod-redhat-*.src.rpm" - rlRun "rpmbuild --rebuild rpm/SRPMS/kmod-redhat-*.src.rpm" - - popd - rlPhaseEnd - - rlPhaseStartCleanup - rlPhaseEnd - - rlJournalPrintText -rlJournalEnd diff --git a/tests/smoke.fmf b/tests/smoke.fmf new file mode 100644 index 0000000..c796302 --- /dev/null +++ b/tests/smoke.fmf @@ -0,0 +1,2 @@ +execute: + script: ddiskit --help diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 1f35a2f..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-beakerlib - tests: - - sanity - required_packages: - - kernel-devel - - ddiskit