smc-tools/tests/sanity/Makefile

91 lines
3.1 KiB
Makefile
Raw Normal View History

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of smc-tools/sanity
# Description: smc-tools test
#
# 2019-04-01
# Author: Čestmír Kalina <ckalina@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# 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.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TENV=_env
ifeq ($(PKG_TOP_DIR),)
export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \
[ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
export _TOP_DIR := $(shell p=$$PWD; while :; do \
[ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
-include $(PKG_TOP_DIR)/env.mk
endif
include $(TENV)
ifeq ($(_TOP_DIR),)
_TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE)
endif
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(TENV) $(METADATA) Makefile common-tests.sh runtest.sh
.PHONY: all install download clean
run: $(FILES) build
( set +o posix; . /usr/bin/rhts_environment.sh; \
. /usr/share/beakerlib/beakerlib.sh; \
. runtest.sh )
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -fr *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Čestmír Kalina <ckalina@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: smc-tools tests">> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: smc-tools" >> $(METADATA)
@echo "Requires: bash" >> $(METADATA)
@echo "Requires: coreutils" >> $(METADATA)
@echo "Requires: kernel" >> $(METADATA)
@echo "Requires: kmod" >> $(METADATA)
@echo "Requires: kernel-devel" >> $(METADATA)
@echo "Requires: kernel-modules" >> $(METADATA)
@echo "Requires: kernel-abi-whitelists" >> $(METADATA)
@echo "Requires: xz" >> $(METADATA)
@echo "Requires: bzip2" >> $(METADATA)
@echo "Requires: gzip" >> $(METADATA)
@echo "ExclusiveArch: s390x" >> $(METADATA)
@echo "Requires: $(PACKAGE_NAME) rpm wget iputils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)