From 4a01f36d210491e78765b5f6875ecd840f8c3b1e Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 26 Apr 2019 23:41:49 -0700 Subject: tests: Merge recovery_component_test into recovery_unit_test. Most of the tests in component/ are in fact unit tests. And it doesn't look practically beneficial to distinguish between the two: - They have the same test setup; - We always run both (recovery_unit_test and recovery_component_test) at the same time; - Breaking any of them would be equally bad. This CL merges the tests in recovery_component_test into recovery_unit_test to save the effort to maintain both. Test: Run recovery_unit_test on marlin (via `adb sync data`). Test: `atest recovery_unit_test` Change-Id: I93ff32e7219cd83425a4bcfe5613978a8dd48d75 --- tests/Android.bp | 45 ++++++++++++--------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) (limited to 'tests/Android.bp') diff --git a/tests/Android.bp b/tests/Android.bp index 2e5334d9e..ec2124a54 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -79,6 +79,8 @@ librecovery_static_libs = [ "libinstall", "librecovery_ui", "libminui", + "libfusesideload", + "libbootloader_message", "libotautil", "libhealthhalutils", @@ -87,10 +89,8 @@ librecovery_static_libs = [ "android.hardware.health@2.0", "android.hardware.health@1.0", - "libbootloader_message", "libext4_utils", "libfs_mgr", - "libfusesideload", "libhidl-gen-utils", "libhidlbase", "libhidltransport", @@ -107,6 +107,7 @@ cc_test { defaults: [ "recovery_test_defaults", + "libupdater_defaults", ], test_suites: ["device-tests"], @@ -115,16 +116,21 @@ cc_test { "unit/*.cpp", ], - static_libs: libapplypatch_static_libs + [ - "libinstall", + static_libs: libapplypatch_static_libs + librecovery_static_libs + [ "librecovery_ui", "libminui", "libotautil", "libupdater", + "libupdate_verifier", + "libgtest_prod", + "libprotobuf-cpp-lite", ], - data: ["testdata/*"], + data: [ + "testdata/*", + ":res-testdata", + ], } cc_test { @@ -142,33 +148,6 @@ cc_test { ], } -cc_test { - name: "recovery_component_test", - isolated: true, - - defaults: [ - "recovery_test_defaults", - "libupdater_defaults", - ], - - test_suites: ["device-tests"], - - srcs: [ - "component/*.cpp", - ], - - static_libs: libapplypatch_static_libs + librecovery_static_libs + [ - "libupdater", - "libupdate_verifier", - "libprotobuf-cpp-lite", - ], - - data: [ - "testdata/*", - ":res-testdata", - ], -} - cc_test_host { name: "recovery_host_test", isolated: true, @@ -178,7 +157,7 @@ cc_test_host { ], srcs: [ - "component/imgdiff_test.cpp", + "unit/imgdiff_test.cpp", ], static_libs: [ -- cgit v1.2.3