From 883c1346b87537ed93f7d4fd88bbbb041c14d320 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Mon, 11 May 2020 23:30:29 +0000 Subject: Revert^2 "Remove test_per_src from ART tests." Second attempt at this, which fixes the asan failures. Remove test_per_src since it is not supported by atest. Replace it with gtest_isolate which is transparent to atest, and which still allows us to run tests in parallel. The size of test binaries halves (from 1GB to 0.5GB). Test run-time on host is unchanged. Test run-time on target is 4x faster (tested on walleye). Added a gtest_main.cc with the gtest isolated main function, and ART-specific initialization. Bug: 147819342 Test: m test-art-host-gtest Test: art/tools/run-gtests.sh Test: art/test/testrunner/run_build_test_target.py art-gtest-asan Change-Id: I515c911bb7d44285495802fc66cd732fc8e6d8df --- compiler/optimizing/codegen_test_utils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/codegen_test_utils.h') diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index 9fbd7d6fc0..9d15f1f294 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -313,25 +313,25 @@ static void RunCode(CodegenTargetConfig target_config, } #ifdef ART_ENABLE_CODEGEN_arm -CodeGenerator* create_codegen_arm_vixl32(HGraph* graph, const CompilerOptions& compiler_options) { +inline CodeGenerator* create_codegen_arm_vixl32(HGraph* graph, const CompilerOptions& compiler_options) { return new (graph->GetAllocator()) TestCodeGeneratorARMVIXL(graph, compiler_options); } #endif #ifdef ART_ENABLE_CODEGEN_arm64 -CodeGenerator* create_codegen_arm64(HGraph* graph, const CompilerOptions& compiler_options) { +inline CodeGenerator* create_codegen_arm64(HGraph* graph, const CompilerOptions& compiler_options) { return new (graph->GetAllocator()) TestCodeGeneratorARM64(graph, compiler_options); } #endif #ifdef ART_ENABLE_CODEGEN_x86 -CodeGenerator* create_codegen_x86(HGraph* graph, const CompilerOptions& compiler_options) { +inline CodeGenerator* create_codegen_x86(HGraph* graph, const CompilerOptions& compiler_options) { return new (graph->GetAllocator()) TestCodeGeneratorX86(graph, compiler_options); } #endif #ifdef ART_ENABLE_CODEGEN_x86_64 -CodeGenerator* create_codegen_x86_64(HGraph* graph, const CompilerOptions& compiler_options) { +inline CodeGenerator* create_codegen_x86_64(HGraph* graph, const CompilerOptions& compiler_options) { return new (graph->GetAllocator()) x86_64::CodeGeneratorX86_64(graph, compiler_options); } #endif -- cgit v1.2.3