ART: Remove test files after test
The unix_file tests should remove files and directories when they
are done testing.
Bug: 16505797
Change-Id: Iff6856f64ee42ee9818b4ac23a6de3fe7eec6eae
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index 754496b..05ac70e 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -208,12 +208,17 @@
assembler_.reset(new Ass());
// Fake a runtime test for ScratchFile
- std::string android_data;
- CommonRuntimeTest::SetEnvironmentVariables(android_data);
+ CommonRuntimeTest::SetUpAndroidData(android_data_);
SetUpHelpers();
}
+ void TearDown() OVERRIDE {
+ // We leave temporaries in case this failed so we can debug issues.
+ CommonRuntimeTest::TearDownAndroidData(android_data_, false);
+ tmpnam_ = "";
+ }
+
// Override this to set up any architecture-specific things, e.g., register vectors.
virtual void SetUpHelpers() {}
@@ -687,6 +692,8 @@
std::string resolved_objdump_cmd_;
std::string resolved_disassemble_cmd_;
+ std::string android_data_;
+
static constexpr size_t OBJDUMP_SECTION_LINE_MIN_TOKENS = 6;
};