summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2021-01-31 14:55:01 -0500
committerGravatar Benjamin Barenblat <bbaren@google.com>2021-01-31 15:04:46 -0500
commita75ffd71441bd4607159a99a2371b33e4d217bb8 (patch)
treef304205f4e7652d8e3cadaa2c60d810a4ddc93de
parentc851df16ca33cdb0bfcda414c49c7e93f76bd677 (diff)
Avoid OOM on mipsel buildds by disabling unit tests there
-rwxr-xr-xdebian/rules11
1 files changed, 10 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 859e20ba..a20f22b8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,15 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow reproducible=+fixfilepath
+# Some of the Abseil tests exhaust virtual memory on our mipsel buildds.
+# TODO(bbaren): Key this off available virtual memory rather than a particular
+# architecture.
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),mipsel)
+ABSL_RUN_TESTS=OFF
+else
+ABSL_RUN_TESTS=ON
+endif
+
%:
dh $@
@@ -24,7 +33,7 @@ override_dh_auto_clean:
override_dh_auto_configure:
dh_auto_configure -Bstatic -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=OFF
- dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON -DABSL_RUN_TESTS=ON -DABSL_USE_GOOGLETEST_HEAD=OFF
+ dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON -DABSL_RUN_TESTS=$ABSL_RUN_TESTS -DABSL_USE_GOOGLETEST_HEAD=OFF
override_dh_auto_build:
dh_auto_build -Bstatic