summaryrefslogtreecommitdiffstats
path: root/compiler/utils
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-08-06 14:53:03 -0700
committerAndreas Gampe <agampe@google.com>2014-08-06 16:06:28 -0700
commit7747c8de402f64e3009ca3bcccebddbb70f617ee (patch)
tree491fb0e346d6e0821d209b9617f0abfac78aedb1 /compiler/utils
parent57cd9d3bda952ee2c2cf977fb1e26a0a954e1bab (diff)
downloadart-7747c8de402f64e3009ca3bcccebddbb70f617ee.zip
art-7747c8de402f64e3009ca3bcccebddbb70f617ee.tar.gz
art-7747c8de402f64e3009ca3bcccebddbb70f617ee.tar.bz2
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
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/assembler_test.h11
1 files changed, 9 insertions, 2 deletions
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 @@ class AssemblerTest : public testing::Test {
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 @@ class AssemblerTest : public testing::Test {
std::string resolved_objdump_cmd_;
std::string resolved_disassemble_cmd_;
+ std::string android_data_;
+
static constexpr size_t OBJDUMP_SECTION_LINE_MIN_TOKENS = 6;
};