Import RHEL's wrapper for the upstream test suite
Note: In RHEL, it's "testsuite2" outside of categories, here I'm adding
it to the Sanity category.
Note: I've filed https://bugzilla.redhat.com/show_bug.cgi?id=1963110
and included it as a known failure to make this test pass.
This commit is contained in:
parent
0554fda54f
commit
0e4ab8cfe4
71
tests/Sanity/testsuite/Makefile
Normal file
71
tests/Sanity/testsuite/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/ltrace/Sanity/testsuite
|
||||
# Description: upstream tests for ltrace
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2015 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/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/ltrace/Sanity/testsuite
|
||||
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: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: upstream tests for ltrace" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 5h" >> $(METADATA)
|
||||
@echo "RunFor: ltrace" >> $(METADATA)
|
||||
@echo "Requires: ltrace" >> $(METADATA)
|
||||
@echo "Requires: gcc" >> $(METADATA)
|
||||
@echo "Requires: gcc-c++" >> $(METADATA)
|
||||
@echo "Requires: libstdc++" >> $(METADATA)
|
||||
@echo "Requires: libstdc++-devel" >> $(METADATA)
|
||||
@echo "Requires: rpm-build yum-utils" >> $(METADATA)
|
||||
@echo "Requires: elfutils-devel" >> $(METADATA)
|
||||
@echo "Requires: dejagnu" >> $(METADATA)
|
||||
@echo "Requires: libselinux-devel" >> $(METADATA)
|
||||
@echo "Requires: libtool" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2+" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
3
tests/Sanity/testsuite/PURPOSE
Normal file
3
tests/Sanity/testsuite/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/ltrace/Sanity/testsuite
|
||||
Description: upstream tests for ltrace
|
||||
Author: Martin Cermak <mcermak@redhat.com>
|
||||
23
tests/Sanity/testsuite/main.fmf
Normal file
23
tests/Sanity/testsuite/main.fmf
Normal file
@ -0,0 +1,23 @@
|
||||
summary: upstream tests for ltrace
|
||||
description: ''
|
||||
contact: Martin Cermak <mcermak@redhat.com>
|
||||
component:
|
||||
- ltrace
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- ltrace
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- libstdc++
|
||||
- libstdc++-devel
|
||||
- rpm-build
|
||||
- yum-utils
|
||||
- elfutils-devel
|
||||
- dejagnu
|
||||
- libselinux-devel
|
||||
- libtool
|
||||
- koji
|
||||
duration: 5h
|
||||
extra-summary: /tools/ltrace/Sanity/testsuite
|
||||
extra-task: /tools/ltrace/Sanity/testsuite
|
||||
79
tests/Sanity/testsuite/runtest.sh
Executable file
79
tests/Sanity/testsuite/runtest.sh
Executable file
@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/ltrace/Sanity/testsuite
|
||||
# Description: upstream tests for ltrace
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2015 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
|
||||
|
||||
CMD='ltrace'
|
||||
BIN=$(which --skip-alias $CMD)
|
||||
PACKAGE="${PACKAGE:-$(rpm -qf $BIN)}"
|
||||
export PACKAGE
|
||||
|
||||
GCC=${GCC:-gcc}
|
||||
export GCC
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun -l "rpm -qf $(which $GCC)" 0 "Checking gcc rpm version"
|
||||
rlRun "TMP=`mktemp -d`"
|
||||
rlRun "pushd $TMP"
|
||||
|
||||
rlRun "koji download-build --arch=src $PACKAGE"
|
||||
rlRun "dnf builddep -y *src.rpm"
|
||||
rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm"
|
||||
rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "pushd BUILD/${CMD}-*"
|
||||
|
||||
# known issues to be ignored
|
||||
ignore_list=''
|
||||
rlRun "ignore_list+=' system_calls.exp'" 0 "Failure reported bz#1963110"
|
||||
|
||||
# define --ignore parameter for 'make check' if there is any testcase to be ignored
|
||||
[ -n "$ignore_list" ] && rlRun "ignore_param=\"--ignore '$ignore_list'\"" 0 "Ignored testcases that will not be run: $ignore_list"
|
||||
|
||||
# test
|
||||
set -o pipefail
|
||||
rlRun "make check RUNTESTFLAGS=\"--tool_exec=$BIN CC_FOR_TARGET=$GCC $ignore_param\" |& tee $TMP/check.log"
|
||||
rlRun "popd"
|
||||
|
||||
# no unexpected results should appear
|
||||
rlRun -l "grep '^FAIL:' check.log" 1
|
||||
rlRun -l "grep '^# of unexpected' check.log" 1
|
||||
|
||||
rlFileSubmit "$TMP/check.log" "$PACKAGE-check.log"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TMP"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Reference in New Issue
Block a user