diff options
| author | 2021-09-24 05:06:07 +0000 | |
|---|---|---|
| committer | 2021-09-27 11:38:22 +0000 | |
| commit | 617c6abeff925b55808df8c8f01888545cd3908c (patch) | |
| tree | 82dadd94a743e8631e3dec52e33212ccde43c676 | |
| parent | 9c00c65380580506e6990eae9479165f148928b1 (diff) | |
Loosen the SDK requirement of a test case in OdRefreshTest.
OdRefreshTest.CompileSetsCompilerFilterForSystemServer has a check that
skips the test case when the SDK version is lower then 31. However,
Android S (SDK level 31) has not been pushed to AOSP, causing the test
to be skipped on AOSP. This change lowers the min SDK version to 30.
Bug: 196188549
Test: atest art_standalone_odrefresh_tests
Change-Id: If268782e147091bf9c4613b57811d63154618484
| -rw-r--r-- | odrefresh/odrefresh_test.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/odrefresh/odrefresh_test.cc b/odrefresh/odrefresh_test.cc index 99b8d0334c..bbcca60c0a 100644 --- a/odrefresh/odrefresh_test.cc +++ b/odrefresh/odrefresh_test.cc @@ -16,6 +16,7 @@ #include "odrefresh.h" +#include <sys/system_properties.h> #include <unistd.h> #include <functional> @@ -24,23 +25,18 @@ #include <vector> #include "android-base/parseint.h" -#include "android-base/stringprintf.h" -#include "base/stl_util.h" -#include "odr_artifacts.h" - -#ifdef __ANDROID__ -#include <android/api-level.h> -#endif - #include "android-base/properties.h" #include "android-base/scopeguard.h" +#include "android-base/stringprintf.h" #include "android-base/strings.h" #include "arch/instruction_set.h" #include "base/common_art_test.h" #include "base/file_utils.h" +#include "base/stl_util.h" #include "exec_utils.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "odr_artifacts.h" #include "odr_common.h" #include "odr_config.h" #include "odr_fs_utils.h" @@ -222,13 +218,11 @@ TEST_F(OdRefreshTest, OdrefreshArtifactDirectory) { } TEST_F(OdRefreshTest, CompileSetsCompilerFilter) { -#ifdef __ANDROID__ - // This test depends on a system property introduced in S. Since the whole odrefresh program is - // for S and later, we don't need to run the test on older platforms. - if (android_get_device_api_level() < __ANDROID_API_S__) { + // This test depends on a system property that doesn't exist on old platforms. Since the whole + // odrefresh program is for S and later, we don't need to run the test on old platforms. + if (__system_property_find("dalvik.vm.systemservercompilerfilter") == nullptr) { return; } -#endif { // Defaults to "speed". |