Refactor flaky ArtDexFileLoader IsPlatformDex gtest
The gtest has been failing randomly, unable to open a dex file copied into a known location. Refactor the test: (a) to not copy/remove in SetUp()/TearDown() because that happens before every test in the test case, not just the one test where it is needed, and (b) to copy the file just before it is being opened and to remove the file as soon as it is not needed, and (c) into smaller tests, each testing one location, and (d) always print the error message ArtDexFileLoader failed with. Bug: 79177384 Test: make test-art-host-gtest-art_dex_file_loader_test Merged-In: Icfd55c1b88938cf88441d501b10e285f4fcdb60f Change-Id: Icfd55c1b88938cf88441d501b10e285f4fcdb60f (cherry picked from commit ba205000)
Loading
Please sign in to comment