From 4ce907d2ceeadc1f66d874a4d12207ea2397bd7f Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 23 Jan 2015 11:35:48 -0800 Subject: [PATCH] Allow make to set a timeout for the host tests. Change-Id: Icc2ebf64bd1da1687bf313fe7a5640155c5795d8 --- tests/Android.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Android.mk b/tests/Android.mk index 11fb2c8b5..87c330b21 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -413,11 +413,15 @@ bionic-unit-tests-glibc-run: bionic-unit-tests-glibc include $(LOCAL_PATH)/../build/run-on-host.mk ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64)) + +TEST_TIMEOUT := 0 + # BIONIC_TEST_FLAGS is either empty or it comes from the user. bionic-unit-tests-run-on-host32: bionic-unit-tests bionic-prepare-run-on-host ANDROID_DATA=$(TARGET_OUT_DATA) \ ANDROID_DNS_MODE=local \ ANDROID_ROOT=$(TARGET_OUT) \ + timeout $(TEST_TIMEOUT) \ $(TARGET_OUT_DATA)/nativetest/bionic-unit-tests/bionic-unit-tests32 $(BIONIC_TEST_FLAGS) ifeq ($(TARGET_IS_64_BIT),true) @@ -426,6 +430,7 @@ bionic-unit-tests-run-on-host64: bionic-unit-tests bionic-prepare-run-on-host ANDROID_DATA=$(TARGET_OUT_DATA) \ ANDROID_DNS_MODE=local \ ANDROID_ROOT=$(TARGET_OUT) \ + timeout $(TEST_TIMEOUT) \ $(TARGET_OUT_DATA)/nativetest64/bionic-unit-tests/bionic-unit-tests64 $(BIONIC_TEST_FLAGS) endif