diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Android.bp | 15 | ||||
-rw-r--r-- | tests/fuzz/verify_package_fuzzer.cpp | 2 | ||||
-rw-r--r-- | tests/unit/host/update_simulator_test.cpp | 14 | ||||
-rw-r--r-- | tests/unit/package_test.cpp | 2 | ||||
-rw-r--r-- | tests/unit/verifier_test.cpp | 4 |
5 files changed, 26 insertions, 11 deletions
diff --git a/tests/Android.bp b/tests/Android.bp index 5ef4d58c0..9ad3d3b80 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -134,11 +134,22 @@ cc_test { test_suites: ["device-tests"], + tidy_timeout_srcs: [ + "unit/commands_test.cpp", + ], + srcs: [ "unit/*.cpp", ], + shared_libs: [ + "libbinder_ndk", + ], + static_libs: libapplypatch_static_libs + librecovery_static_libs + [ + "android.hardware.health-translate-ndk", + "android.hardware.health-V1-ndk", + "libhealthshim", "librecovery_ui", "libfusesideload", "libminui", @@ -185,6 +196,10 @@ cc_test_host { "libupdater_defaults", ], + tidy_timeout_srcs: [ + "unit/host/imgdiff_test.cpp", + ], + srcs: [ "unit/host/*", ], diff --git a/tests/fuzz/verify_package_fuzzer.cpp b/tests/fuzz/verify_package_fuzzer.cpp index baa44e070..36c853465 100644 --- a/tests/fuzz/verify_package_fuzzer.cpp +++ b/tests/fuzz/verify_package_fuzzer.cpp @@ -17,7 +17,7 @@ #include "fuzzer/FuzzedDataProvider.h" #include "install/install.h" -#include "install/package.h" +#include "otautil/package.h" #include "recovery_ui/stub_ui.h" std::unique_ptr<Package> CreatePackage(std::vector<uint8_t>& content) { diff --git a/tests/unit/host/update_simulator_test.cpp b/tests/unit/host/update_simulator_test.cpp index fb1217877..1603982e4 100644 --- a/tests/unit/host/update_simulator_test.cpp +++ b/tests/unit/host/update_simulator_test.cpp @@ -101,7 +101,7 @@ static void RunSimulation(std::string_view src_tf, std::string_view ota_package, // TODO(xunchang) check the recovery&system has the expected contents. } -class UpdateSimulatorTest : public ::testing::Test { +class DISABLED_UpdateSimulatorTest : public ::testing::Test { protected: void SetUp() override { std::vector<string> props = { @@ -147,7 +147,7 @@ class UpdateSimulatorTest : public ::testing::Test { string sparse_system_string_; }; -TEST_F(UpdateSimulatorTest, TargetFile_ExtractImage) { +TEST_F(DISABLED_UpdateSimulatorTest, TargetFile_ExtractImage) { TemporaryFile zip_file; AddZipEntries(zip_file.release(), { { "META/misc_info.txt", "extfs_sparse_flag=-s" }, { "IMAGES/system.img", sparse_system_string_ } }); @@ -166,7 +166,7 @@ TEST_F(UpdateSimulatorTest, TargetFile_ExtractImage) { ASSERT_EQ(expected_content, content); } -TEST_F(UpdateSimulatorTest, TargetFile_ParseFstabInfo) { +TEST_F(DISABLED_UpdateSimulatorTest, TargetFile_ParseFstabInfo) { TemporaryFile zip_file; AddZipEntries(zip_file.release(), { { "META/misc_info.txt", "" }, @@ -195,7 +195,7 @@ TEST_F(UpdateSimulatorTest, TargetFile_ParseFstabInfo) { EXPECT_EQ(expected, transformed); } -TEST_F(UpdateSimulatorTest, BuildInfo_ParseTargetFile) { +TEST_F(DISABLED_UpdateSimulatorTest, BuildInfo_ParseTargetFile) { std::map<string, string> entries = { { "META/misc_info.txt", "" }, { "SYSTEM/build.prop", build_prop_string_ }, @@ -240,7 +240,7 @@ TEST_F(UpdateSimulatorTest, BuildInfo_ParseTargetFile) { } } -TEST_F(UpdateSimulatorTest, RunUpdateSmoke) { +TEST_F(DISABLED_UpdateSimulatorTest, RunUpdateSmoke) { string recovery_img_string = "recovery.img"; string boot_img_string = "boot.img"; @@ -326,7 +326,7 @@ TEST_F(UpdateSimulatorTest, RunUpdateSmoke) { RunSimulation(src_tf.path, ota_package.path, true); } -TEST_F(UpdateSimulatorTest, RunUpdateUnrecognizedFunction) { +TEST_F(DISABLED_UpdateSimulatorTest, RunUpdateUnrecognizedFunction) { std::map<string, string> src_entries{ { "META/misc_info.txt", "extfs_sparse_flag=-s" }, { "IMAGES/system.img", sparse_system_string_ }, @@ -350,7 +350,7 @@ TEST_F(UpdateSimulatorTest, RunUpdateUnrecognizedFunction) { RunSimulation(src_tf.path, ota_package.path, false); } -TEST_F(UpdateSimulatorTest, RunUpdateApplyPatchFailed) { +TEST_F(DISABLED_UpdateSimulatorTest, RunUpdateApplyPatchFailed) { string recovery_img_string = "recovery.img"; string boot_img_string = "boot.img"; diff --git a/tests/unit/package_test.cpp b/tests/unit/package_test.cpp index 164a93d57..66882bb40 100644 --- a/tests/unit/package_test.cpp +++ b/tests/unit/package_test.cpp @@ -26,7 +26,7 @@ #include <ziparchive/zip_writer.h> #include "common/test_constants.h" -#include "install/package.h" +#include "otautil/package.h" class PackageTest : public ::testing::Test { protected: diff --git a/tests/unit/verifier_test.cpp b/tests/unit/verifier_test.cpp index ded23c52f..08a3ddfc4 100644 --- a/tests/unit/verifier_test.cpp +++ b/tests/unit/verifier_test.cpp @@ -35,8 +35,8 @@ #include <ziparchive/zip_writer.h> #include "common/test_constants.h" -#include "install/package.h" -#include "install/verifier.h" +#include "otautil/package.h" +#include "otautil/verifier.h" #include "otautil/sysutil.h" using namespace std::string_literals; |