summaryrefslogtreecommitdiff
blob: 3b83291944bc4c035285f03597a207305f1d643f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

toolchain-glibc_src_test() {
	cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
	unset LD_ASSUME_KERNEL
	emake -j1 check && return 0
	einfo "make check failed - re-running with --keep-going to get the rest of the results"
	emake -j1 -k check
	ewarn "make check failed for ${ABI}-${CTARGET}-$1"
	return 1
}

eblit-glibc-src_test() {
	local ret=0

	setup_env

	# give tests more time to complete
	export TIMEOUTFACTOR=5

	if [[ -z ${OABI} ]] && has_multilib_profile ; then
		OABI=${ABI}
		einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
		for ABI in $(get_install_abis) ; do
			export ABI
			einfo "   Testing ${ABI} glibc"
			src_test
			((ret+=$?))
		done
		ABI=${OABI}
		unset OABI
		[[ ${ret} -ne 0 ]] \
			&& die "tests failed" \
			|| return 0
	fi

	want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?))
	want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?))
	return ${ret}
}