update tests/testsuite
Sync the test case with Fedora Rawhide. Resolves: RHEL-69755
This commit is contained in:
parent
4b3e4b7612
commit
e5c8500bea
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Red Hat, Inc.
|
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or
|
# This program is free software: you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License as
|
# modify it under the terms of the GNU General Public License as
|
||||||
@ -28,7 +28,7 @@ export TESTVERSION=1.0
|
|||||||
|
|
||||||
BUILT_FILES=
|
BUILT_FILES=
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE dynamic_linking.patch dynamic_linking-dg.patch
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
.PHONY: all install download clean
|
.PHONY: all install download clean
|
||||||
|
|
||||||
@ -51,9 +51,9 @@ $(METADATA): Makefile
|
|||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
@echo "Description: Runs upstream testsuite" >> $(METADATA)
|
@echo "Description: Runs upstream testsuite" >> $(METADATA)
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
@echo "TestTime: 19m" >> $(METADATA)
|
@echo "TestTime: 35m" >> $(METADATA)
|
||||||
@echo "RunFor: libffi" >> $(METADATA)
|
@echo "RunFor: libffi" >> $(METADATA)
|
||||||
@echo "Requires: libffi libffi-devel gcc dejagnu rpm-build gcc-c++ texinfo strace" >> $(METADATA)
|
@echo "Requires: libffi libffi-devel libtool gcc dejagnu rpm-build gcc-c++ texinfo strace" >> $(METADATA)
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
@echo "License: GPLv3" >> $(METADATA)
|
@echo "License: GPLv3" >> $(METADATA)
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
--- testsuite/lib/libffi-dg.exp 2008-02-14 19:45:33.000000000 -0500
|
|
||||||
+++ testsuite/lib/libffi-dg.exp 2015-02-13 13:32:08.422053435 -0500
|
|
||||||
@@ -110,7 +110,7 @@
|
|
||||||
}
|
|
||||||
verbose "gccdir $gccdir"
|
|
||||||
|
|
||||||
- set ld_library_path "."
|
|
||||||
+ set ld_library_path ""
|
|
||||||
append ld_library_path ":${gccdir}"
|
|
||||||
|
|
||||||
set compiler "${gccdir}/xgcc"
|
|
||||||
@@ -127,16 +127,13 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- # add the library path for libffi.
|
|
||||||
- append ld_library_path ":${blddirffi}/.libs"
|
|
||||||
-
|
|
||||||
verbose "ld_library_path: $ld_library_path"
|
|
||||||
|
|
||||||
# Point to the Libffi headers in libffi.
|
|
||||||
set libffi_include "${blddirffi}/include"
|
|
||||||
verbose "libffi_include $libffi_include"
|
|
||||||
|
|
||||||
- set libffi_dir "${blddirffi}/.libs"
|
|
||||||
+ set libffi_dir "/usr/LIBRARY_DIR"
|
|
||||||
verbose "libffi_dir $libffi_dir"
|
|
||||||
if { $libffi_dir != "" } {
|
|
||||||
set libffi_dir [file dirname ${libffi_dir}]
|
|
@ -1,29 +0,0 @@
|
|||||||
--- testsuite/lib/libffi.exp 2013-03-16 07:19:39.000000000 -0400
|
|
||||||
+++ testsuite/lib/libffi.exp 2014-10-22 11:10:42.449143642 -0400
|
|
||||||
@@ -118,7 +118,7 @@
|
|
||||||
}
|
|
||||||
verbose "gccdir $gccdir"
|
|
||||||
|
|
||||||
- set ld_library_path "."
|
|
||||||
+ set ld_library_path ""
|
|
||||||
append ld_library_path ":${gccdir}"
|
|
||||||
|
|
||||||
set compiler "${gccdir}/xgcc"
|
|
||||||
@@ -142,16 +142,13 @@
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- # add the library path for libffi.
|
|
||||||
- append ld_library_path ":${blddirffi}/.libs"
|
|
||||||
-
|
|
||||||
verbose "ld_library_path: $ld_library_path"
|
|
||||||
|
|
||||||
# Point to the Libffi headers in libffi.
|
|
||||||
set libffi_include "${blddirffi}/include"
|
|
||||||
verbose "libffi_include $libffi_include"
|
|
||||||
|
|
||||||
- set libffi_dir "${blddirffi}/.libs"
|
|
||||||
+ set libffi_dir "/usr/LIBRARY_DIR"
|
|
||||||
verbose "libffi_dir $libffi_dir"
|
|
||||||
if { $libffi_dir != "" } {
|
|
||||||
set libffi_dir [file dirname ${libffi_dir}]
|
|
33
tests/testsuite/main.fmf
Normal file
33
tests/testsuite/main.fmf
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
summary: Runs upstream testsuite
|
||||||
|
description: ''
|
||||||
|
enabled: true
|
||||||
|
link:
|
||||||
|
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1031159
|
||||||
|
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=839210
|
||||||
|
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1006261
|
||||||
|
tag:
|
||||||
|
- CI-Tier-1
|
||||||
|
- RHEL6
|
||||||
|
- Tier1
|
||||||
|
- rhel-buildroot
|
||||||
|
tier: '1'
|
||||||
|
contact: mcermak@redhat.com
|
||||||
|
component:
|
||||||
|
- libffi
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
require:
|
||||||
|
- libffi
|
||||||
|
- libffi-devel
|
||||||
|
- libtool
|
||||||
|
- gcc
|
||||||
|
- dejagnu
|
||||||
|
- rpm-build
|
||||||
|
- gcc-c++
|
||||||
|
- texinfo
|
||||||
|
- strace
|
||||||
|
duration: 35m
|
||||||
|
extra-nitrate: TC#0063644
|
||||||
|
extra-summary: /tools/libffi/Sanity/testsuite
|
||||||
|
extra-task: /tools/libffi/Sanity/testsuite
|
||||||
|
id: 2d3a499f-1f59-40f0-a76c-1c73569d0512
|
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#
|
#
|
||||||
# Copyright (c) 2010 Red Hat, Inc.
|
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or
|
# This program is free software: you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License as
|
# modify it under the terms of the GNU General Public License as
|
||||||
@ -26,7 +26,7 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
# Include rhts environment
|
# Include rhts environment
|
||||||
. /usr/lib/beakerlib/beakerlib.sh
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
PACKAGES=(libffi libffi-devel gcc dejagnu rpm-build gcc-c++)
|
PACKAGES=(libffi libffi-devel gcc dejagnu rpm-build gcc-c++)
|
||||||
|
|
||||||
@ -40,33 +40,30 @@ rlJournalStart
|
|||||||
done;
|
done;
|
||||||
|
|
||||||
rlRun "TmpDir=`mktemp -d`" 0 "Creating tmp directory"
|
rlRun "TmpDir=`mktemp -d`" 0 "Creating tmp directory"
|
||||||
rlRun "cp *.patch $TmpDir/"
|
|
||||||
rlRun "pushd $TmpDir"
|
rlRun "pushd $TmpDir"
|
||||||
rlFetchSrcForInstalled libffi
|
rlFetchSrcForInstalled libffi
|
||||||
rlRun "rpm -ivh libffi*.src.rpm"
|
rlRun "rpm -ivh libffi*.src.rpm"
|
||||||
rlRun "popd"
|
rlRun "popd"
|
||||||
rlRun "specfile=$(rpm --eval='%_specdir')/libffi.spec"
|
rlRun "specfile=$(rpm --eval='%_specdir')/libffi.spec"
|
||||||
rlRun "rpmbuild -bp $specfile"
|
rlRun "rpmbuild -bp --undefine specpartsdir $specfile"
|
||||||
rlRun "builddir=$(rpm --eval='%_builddir')"
|
rlRun "builddir=$(rpm --eval='%_builddir')"
|
||||||
rlRun "pushd $builddir/libffi-*/"
|
rlRun "pushd $(dirname `find $builddir -name configure`)"
|
||||||
rlRun "./configure"
|
rlRun "./configure"
|
||||||
rlRUn "make"
|
rlRun "make"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "Run testsuite"
|
rlPhaseStartTest "Run testsuite"
|
||||||
|
set -xe
|
||||||
# patching the testsuite to test the installed libraries instead of the built ones
|
# Patch the testsuite to run with the installed libffi libraries, not
|
||||||
if [ -e /usr/lib64/libffi.so ]; then
|
# with the ones built from the rpm.
|
||||||
export LD_LIBRARY_PATH=/usr/lib64
|
# Do not add the current dir or the build dir to ld_library_path
|
||||||
perl -i -pe 's/LIBRARY_DIR/lib64/' $TmpDir/dynamic_linking.patch
|
sed -i 's/set ld_library_path "."/set ld_library_path ""/' testsuite/lib/libffi*.exp
|
||||||
perl -i -pe 's/LIBRARY_DIR/lib64/' $TmpDir/dynamic_linking-dg.patch
|
sed -i '/append ld_library_path.*blddirffi/d' testsuite/lib/libffi*.exp
|
||||||
else
|
# Set ld_library_path to the system libdir (typically /usr/lib or /usr/lib64)
|
||||||
export LD_LIBRARY_PATH=/usr/lib
|
export MYLIBDIR=$(rpm --eval '%{_libdir}')
|
||||||
perl -i -pe 's/LIBRARY_DIR/lib/' $TmpDir/dynamic_linking.patch
|
sed -i 's;set libffi_dir.*"[^"]*";set libffi_dir "'"${MYLIBDIR}"'";' testsuite/lib/libffi*.exp
|
||||||
perl -i -pe 's/LIBRARY_DIR/lib/' $TmpDir/dynamic_linking-dg.patch
|
fgrep -e 'set ld_library_path' -e 'set libffi_dir' testsuite/lib/libffi.exp
|
||||||
fi
|
set +xe
|
||||||
test -e testsuite/lib/libffi.exp && rlRun "patch testsuite/lib/libffi.exp < $TmpDir/dynamic_linking.patch"
|
|
||||||
test -e testsuite/lib/libffi-dg.exp && rlRun "patch testsuite/lib/libffi-dg.exp < $TmpDir/dynamic_linking-dg.patch"
|
|
||||||
rlLog "Checking whether we test really the installed libraries."
|
rlLog "Checking whether we test really the installed libraries."
|
||||||
strace -F -e open,openat,stat -o strace.log -- make check
|
strace -F -e open,openat,stat -o strace.log -- make check
|
||||||
LIBFFI_SO_CALLS=`cat strace.log | grep libffi.so | grep -v ENOENT | grep -v 'usr/lib' | grep -v '\"\/lib' | grep -v 'unfinished' | wc -l`
|
LIBFFI_SO_CALLS=`cat strace.log | grep libffi.so | grep -v ENOENT | grep -v 'usr/lib' | grep -v '\"\/lib' | grep -v 'unfinished' | wc -l`
|
||||||
|
Loading…
Reference in New Issue
Block a user