[dev-libs/Ice] apply patches from upstream to fix python tests, remove custom test handler, add passlib to test deps, skip some tests due to sandboxing / broken source files
This commit is contained in:
@@ -46,7 +46,10 @@ RDEPEND=">=dev-libs/expat-2.0.1
|
||||
!dev-ruby/IceRuby"
|
||||
DEPEND="${RDEPEND}
|
||||
ncurses? ( sys-libs/ncurses sys-libs/readline )
|
||||
test? ( ${PYTHON_DEPS} )"
|
||||
test? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/passlib[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
REQUIRED_USE="php_namespaces? ( php )"
|
||||
|
||||
@@ -57,12 +60,11 @@ REQUIRED_USE="php_namespaces? ( php )"
|
||||
# SUPPORT_PYTHON_ABIS=1 otherwise we can't get pyc/pyo anymore the sane way.
|
||||
# TODO: java bindings
|
||||
|
||||
#overwrite ruby-ng.eclass default
|
||||
S="${WORKDIR}/${P/I/i}"
|
||||
PHP_EXT_S="${S}/php"
|
||||
|
||||
pkg_setup() {
|
||||
if use ruby && [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]]; then
|
||||
if use test && use ruby && [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]]; then
|
||||
eerror "/usr/bin/ruby is currently not included in Ice's ruby targets: ${RUBY_TARGETS}."
|
||||
eerror "Please update it via `eselect ruby`"
|
||||
die
|
||||
@@ -78,8 +80,11 @@ src_prepare() {
|
||||
epatch "${FILESDIR}/${P}-libressl.patch"
|
||||
epatch "${FILESDIR}/${P}-no-arch-opts.patch"
|
||||
epatch "${FILESDIR}/${P}-csharp.patch"
|
||||
epatch "${FILESDIR}/${P}-python-test.patch"
|
||||
epatch "${FILESDIR}/${P}-python-test-import.patch"
|
||||
sed -i \
|
||||
-e 's|\(install_configdir[[:space:]]*\):=|\1?=|' \
|
||||
-e 's|-L\$\(libdir\)||' \
|
||||
cpp/config/Make.rules || die "sed failed"
|
||||
|
||||
sed -i \
|
||||
@@ -113,6 +118,17 @@ src_prepare() {
|
||||
-e '/SUBDIRS/s|\ test||' \
|
||||
csharp/Makefile || die "sed failed"
|
||||
|
||||
# skip udp test due to multicast
|
||||
# skip IceSSL tests due to requirement of internet connection
|
||||
sed -i \
|
||||
-e 's|allTests.py|allTests.py --rfilter=udp --rfilter=IceSSL --rfilter=IceGrid\/simple|' \
|
||||
cpp/Makefile || die "sed failed"
|
||||
|
||||
# mainly broken .ice files
|
||||
sed -i \
|
||||
-e 's|allTests.py|allTests.py --rfilter=operations --rfilter=slicing\/objects|' \
|
||||
python/Makefile || die "sed failed"
|
||||
|
||||
if ! use test ; then
|
||||
sed -i \
|
||||
-e '/SUBDIRS/s|\ test||' \
|
||||
@@ -170,6 +186,12 @@ src_configure() {
|
||||
sed -i \
|
||||
-e 's|RUBY = ruby|\022|' \
|
||||
ruby/config/Make.rules || die "sed failed"
|
||||
sed -i \
|
||||
-e 's|env ruby|\022|' \
|
||||
ruby/config/s2rb.rb || die "sed failed"
|
||||
sed -i \
|
||||
-e 's|env ruby|\022|' \
|
||||
ruby/scripts/slice2rb || die "sed failed"
|
||||
fi
|
||||
|
||||
MAKE_RULES_CS="GACINSTALL=yes GAC_ROOT=\"${ED}/usr/$(get_libdir)\" GAC_DIR=${EPREFIX}/usr/$(get_libdir)
|
||||
@@ -289,39 +311,32 @@ src_install() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_tests() {
|
||||
# Run tests through the script interface since Python test runner
|
||||
# fails to exit with non-zero code for some reason.
|
||||
|
||||
pushd "${1}" >/dev/null || die
|
||||
./allTests.py --script | sh
|
||||
ret=${?}
|
||||
popd >/dev/null || die
|
||||
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export LD_LIBRARY_PATH="${S}/cpp/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
|
||||
emake -C cpp ${MAKE_RULES} test || die "emake cpp test failed"
|
||||
|
||||
run_tests cpp || die "emake cpp test failed"
|
||||
# php tests require the extension loaded and are therefore skipped
|
||||
|
||||
if use python ; then
|
||||
testing() {
|
||||
# tests require that the directory is named 'python'
|
||||
ln -f -s ../"${BUILD_DIR}"/python python/python || die
|
||||
run_tests python || die "emake python-${EPYTHON} test failed"
|
||||
cd "${S}"/python
|
||||
emake -C . ${MAKE_RULES} \
|
||||
install_pythondir="\"${D}/$(python_get_sitedir)\"" \
|
||||
install_libdir="\"${D}/$(python_get_sitedir)\"" \
|
||||
test || die "emake python-${EPYTHON} test failed"
|
||||
cd "${S}"
|
||||
}
|
||||
BUILD_DIR=python python_foreach_impl testing
|
||||
fi
|
||||
|
||||
if use ruby ; then
|
||||
run_tests ruby || die "emake ruby test failed"
|
||||
emake -C ruby ${MAKE_RULES} ${MAKE_RULES_RB} test || die "emake ruby test failed"
|
||||
fi
|
||||
|
||||
if use mono ; then
|
||||
# skip mono tests, bug #498484
|
||||
ewarn "Tests for C# are currently disabled."
|
||||
# run_tests csharp || die "emake csharp test failed"
|
||||
# emake -C csharp ${MAKE_RULES} ${MAKE_RULES_CS} test || die "emake csharp test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user