diff options
| author | Roland Levillain <rpl@google.com> | 2017-10-30 13:14:28 +0000 |
|---|---|---|
| committer | Roland Levillain <rpl@google.com> | 2018-03-14 13:36:34 +0000 |
| commit | a28c9980102dff32d29f9d8df172d793faa0da8a (patch) | |
| tree | 5c5057a15d33b6df6f5f45adf75bf8315759325f /dexdump | |
| parent | 640df8492e21a5869d4f19e625238d0f0a802224 (diff) | |
| download | art-a28c9980102dff32d29f9d8df172d793faa0da8a.tar.gz art-a28c9980102dff32d29f9d8df172d793faa0da8a.tar.bz2 art-a28c9980102dff32d29f9d8df172d793faa0da8a.zip | |
Makes some ART gtests more robust to a non-standard environment.
Two gtests (dexdump_test and dexlist_test) used to try to write
a file in the root directory and expected this operation to fail.
However, in a non-standard environment (e.g. a testing context
where such a gtest is allowed to write in `/`), these tests would
not fail as expected. Replace these paths with more explicit ones
not depending on writing permissions.
Test: Run ART gtest dexdump_test and dexlist_test in a chroot on device.
Bug: 74730596
Bug: 34729697
Change-Id: I23537757639721133d694d5366cf05d9009f05ad
Diffstat (limited to 'dexdump')
| -rw-r--r-- | dexdump/dexdump_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dexdump/dexdump_test.cc b/dexdump/dexdump_test.cc index 63e0e3f20d..3a2d38dec6 100644 --- a/dexdump/dexdump_test.cc +++ b/dexdump/dexdump_test.cc @@ -58,7 +58,7 @@ TEST_F(DexDumpTest, NoInputFileGiven) { TEST_F(DexDumpTest, CantOpenOutput) { std::string error_msg; - ASSERT_FALSE(Exec({"-o", "/joho", dex_file_}, &error_msg)) << error_msg; + ASSERT_FALSE(Exec({"-o", "/non/existent/path", dex_file_}, &error_msg)) << error_msg; } TEST_F(DexDumpTest, BadFlagCombination) { |
