diff options
author | 2021-02-10 14:07:10 +0000 | |
---|---|---|
committer | 2021-02-25 08:44:32 +0000 | |
commit | 4c3ade67c470543562a0029e39b576954a807321 (patch) | |
tree | 21f56e9c9dae7868ee5d68c18457fd0ea3a271fe /libartbase/base/file_utils_test.cc | |
parent | 3a8d7c2de4392ff4c40858803447efe14c3c9fa8 (diff) |
odrefresh: regenerate artifacts after ART APEX update
Replaces compile_bcp.sh to check and compile boot class path
extensions and system server jars.
Enable ART to load those artifacts when present in the ART APEX data
directory.
Bug: 160683548
Test: art_libartbase_tests
Test: adb root && adb odrefresh {--force-check,--force-compile}
Test: adb install com.android.art && adb reboot && adb root && \
adb shell odrefresh {--check,--compile} && adb reboot && \
adb shell cat /proc/<zygote>/maps | grep apexdata
Change-Id: I81bf520d38f9dc0109c91f192bc6e728099049fd
Diffstat (limited to 'libartbase/base/file_utils_test.cc')
-rw-r--r-- | libartbase/base/file_utils_test.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/libartbase/base/file_utils_test.cc b/libartbase/base/file_utils_test.cc index b7cc625969..4dce3dc88a 100644 --- a/libartbase/base/file_utils_test.cc +++ b/libartbase/base/file_utils_test.cc @@ -28,34 +28,6 @@ namespace art { class FileUtilsTest : public CommonArtTest {}; -// Helper class that removes an environment variable whilst in scope. -class ScopedUnsetEnvironmentVariable { - public: - explicit ScopedUnsetEnvironmentVariable(const char* variable) - : variable_{variable}, old_value_{GetOldValue(variable)} { - unsetenv(variable); - } - - ~ScopedUnsetEnvironmentVariable() { - if (old_value_.has_value()) { - static constexpr int kReplace = 1; // tidy-issue: replace argument has libc dependent name. - setenv(variable_, old_value_.value().c_str(), kReplace); - } else { - unsetenv(variable_); - } - } - - private: - static std::optional<std::string> GetOldValue(const char* variable) { - const char* value = getenv(variable); - return value != nullptr ? std::optional<std::string>{value} : std::nullopt; - } - - const char* variable_; - std::optional<std::string> old_value_; - DISALLOW_COPY_AND_ASSIGN(ScopedUnsetEnvironmentVariable); -}; - TEST_F(FileUtilsTest, GetDalvikCacheFilename) { std::string name; std::string error; |