sys-libs/compiler-rt-sanitizers: Add space checks for tests
authorMichał Górny <mgorny@gentoo.org>
Wed, 15 Mar 2017 15:59:34 +0000 (16:59 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 15 Mar 2017 16:06:24 +0000 (17:06 +0100)
Add a space check when tests are enabled. This avoids the issue of tests
starting to fail in the middle of run due to no free space in WORKDIR.
On amd64, the tests can eat up to 11G.

sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.0.ebuild
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild

index e5e2db2c1e4a50c8fc9e73932e3e7c9bfcde7505..70c0d1d6fde8d20bbce6d25cbf4e030ba2bf28ec 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-utils flag-o-matic llvm python-any-r1 versionator
+inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1 versionator
 
 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
 HOMEPAGE="http://llvm.org/"
@@ -37,7 +37,19 @@ S=${WORKDIR}/compiler-rt-${PV/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+check_space() {
+       if use test; then
+               local CHECKREQS_DISK_BUILD=11G
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_pretend() {
+       check_space
+}
+
 pkg_setup() {
+       check_space
        llvm_pkg_setup
        python-any-r1_pkg_setup
 }
index ca1c0b6489285f703766f00dc2cc8b2bf55c2baf..f27e77f73ca8f6430f340adce76386484400fbc6 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-utils flag-o-matic git-r3 llvm python-any-r1 versionator
+inherit check-reqs cmake-utils flag-o-matic git-r3 llvm python-any-r1 versionator
 
 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
 HOMEPAGE="http://llvm.org/"
@@ -36,7 +36,19 @@ DEPEND="
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+check_space() {
+       if use test; then
+               local CHECKREQS_DISK_BUILD=11G
+               check-reqs_pkg_pretend
+       fi
+}
+
+pkg_pretend() {
+       check_space
+}
+
 pkg_setup() {
+       check_space
        llvm_pkg_setup
        python-any-r1_pkg_setup
 }