From a88cc5440ed79a0927f57bbd03377ff3ce04a760 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 25 Oct 2017 13:16:54 -0700 Subject: Switch to bionic gtest in bootable/recovery We encountered segfaults in Imgdiff host tests due to the failure to reset states of getopt. The problem can be solved by switching to use bionic's gtest where a new process is forked for each test. Also modify the recovery_component_test to make sure it runs in parallel. Changes include: 1. Merge the writes to misc partition into one single test. 2. Change the hard coded location "/cache/saved.file" into a configurable variable. Bug: 67849209 Test: recovery tests pass Change-Id: I165d313f32b83393fb7922c5078636ac40b50bc2 --- tests/Android.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/Android.mk') diff --git a/tests/Android.mk b/tests/Android.mk index 8ebb60308..d911c25e4 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -30,7 +30,8 @@ LOCAL_STATIC_LIBRARIES := \ libutils \ libz \ libselinux \ - libbase + libbase \ + libBionicGtestMain LOCAL_SRC_FILES := \ unit/asn1_decoder_test.cpp \ @@ -50,7 +51,8 @@ LOCAL_CFLAGS := -Wall -Werror LOCAL_MODULE := recovery_manual_test LOCAL_STATIC_LIBRARIES := \ libminui \ - libbase + libbase \ + libBionicGtestMain LOCAL_SRC_FILES := manual/recovery_test.cpp LOCAL_SHARED_LIBRARIES := \ @@ -163,6 +165,7 @@ LOCAL_STATIC_LIBRARIES := \ libsquashfs_utils \ libcutils \ libbrotli \ + libBionicGtestMain \ $(tune2fs_static_libraries) testdata_files := $(call find-subdir-files, testdata/*) @@ -212,7 +215,8 @@ LOCAL_STATIC_LIBRARIES := \ libbz \ libdivsufsort64 \ libdivsufsort \ - libz + libz \ + libBionicGtestMain LOCAL_SHARED_LIBRARIES := \ liblog include $(BUILD_HOST_NATIVE_TEST) -- cgit v1.2.3