From 7747c8de402f64e3009ca3bcccebddbb70f617ee Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 6 Aug 2014 14:53:03 -0700 Subject: 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 --- compiler/utils/assembler_test.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'compiler/utils/assembler_test.h') diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h index 754496b332..05ac70ed74 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; }; -- cgit v1.2.3-59-g8ed1b