riscv64: disable gtests for unsupported components.
Bug: b/271573990
Test: gtests on host:
lunch aosp_riscv64-userdebug && m test-art-host-gtest
Test: gtests on target (on a Linux RISC-V VM):
lunch aosp_riscv64-userdebug
export ART_TEST_SSH_USER=ubuntu
export ART_TEST_SSH_HOST=localhost
export ART_TEST_SSH_PORT=10001
export ART_TEST_ON_VM=true
. art/tools/buildbot-utils.sh
art/tools/buildbot-build.sh --target
# Create, boot and configure the VM.
art/tools/buildbot-vm.sh create
art/tools/buildbot-vm.sh boot
art/tools/buildbot-vm.sh setup-ssh # password: 'ubuntu'
art/tools/buildbot-cleanup-device.sh
art/tools/buildbot-setup-device.sh
art/tools/buildbot-sync.sh
art/tools/run-gtests.sh
Change-Id: I278e3453406a91a5e9d03645cafb9a9d1f82d896
diff --git a/compiler/compiler_reflection_test.cc b/compiler/compiler_reflection_test.cc
index f3c07db..d8e2b9e 100644
--- a/compiler/compiler_reflection_test.cc
+++ b/compiler/compiler_reflection_test.cc
@@ -29,6 +29,7 @@
class CompilerReflectionTest : public CommonCompilerTest {};
TEST_F(CompilerReflectionTest, StaticMainMethod) {
+ TEST_DISABLED_FOR_RISCV64();
ScopedObjectAccess soa(Thread::Current());
jobject jclass_loader = LoadDex("Main");
StackHandleScope<1> hs(soa.Self());
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
index 397db25..2fd7a6b 100644
--- a/compiler/jni/jni_compiler_test.cc
+++ b/compiler/jni/jni_compiler_test.cc
@@ -447,12 +447,14 @@
// 1) synchronized keyword
# define JNI_TEST_NORMAL_ONLY(TestName) \
TEST_F(JniCompilerTest, TestName ## NormalCompiler) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("Normal JNI with compiler"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kNormal); \
TestName ## Impl(); \
} \
TEST_F(JniCompilerTest, TestName ## NormalGeneric) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("Normal JNI with generic"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kNormal); \
@@ -464,6 +466,7 @@
#define JNI_TEST(TestName) \
JNI_TEST_NORMAL_ONLY(TestName) \
TEST_F(JniCompilerTest, TestName ## FastCompiler) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("@FastNative JNI with compiler"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kFast); \
@@ -471,6 +474,7 @@
} \
\
TEST_F(JniCompilerTest, TestName ## FastGeneric) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("@FastNative JNI with generic"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kFast); \
@@ -481,12 +485,14 @@
// Test (@CriticalNative) x (compiler, generic) only.
#define JNI_TEST_CRITICAL_ONLY(TestName) \
TEST_F(JniCompilerTest, TestName ## CriticalCompiler) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("@CriticalNative JNI with compiler"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kCritical); \
TestName ## Impl(); \
} \
TEST_F(JniCompilerTest, TestName ## CriticalGeneric) { \
+ TEST_DISABLED_FOR_RISCV64(); \
ScopedCheckHandleScope top_handle_scope_check; \
SCOPED_TRACE("@CriticalNative JNI with generic"); \
gCurrentJni = static_cast<uint32_t>(JniKind::kCritical); \
diff --git a/compiler/optimizing/linearize_test.cc b/compiler/optimizing/linearize_test.cc
index 01daa23..6f4f2b6 100644
--- a/compiler/optimizing/linearize_test.cc
+++ b/compiler/optimizing/linearize_test.cc
@@ -55,6 +55,7 @@
}
TEST_F(LinearizeTest, CFG1) {
+ TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -80,6 +81,7 @@
}
TEST_F(LinearizeTest, CFG2) {
+ TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -105,6 +107,7 @@
}
TEST_F(LinearizeTest, CFG3) {
+ TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -132,6 +135,7 @@
}
TEST_F(LinearizeTest, CFG4) {
+ TEST_DISABLED_FOR_RISCV64();
/* Structure of this graph (+ are back edges)
// Block0
// |
@@ -162,6 +166,7 @@
}
TEST_F(LinearizeTest, CFG5) {
+ TEST_DISABLED_FOR_RISCV64();
/* Structure of this graph (+ are back edges)
// Block0
// |
@@ -192,6 +197,7 @@
}
TEST_F(LinearizeTest, CFG6) {
+ TEST_DISABLED_FOR_RISCV64();
// Block0
// |
// Block1
@@ -218,6 +224,7 @@
}
TEST_F(LinearizeTest, CFG7) {
+ TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index fb1a23e..7e488ba 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -47,6 +47,7 @@
}
TEST_F(LiveRangesTest, CFG1) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* return 0;
@@ -81,6 +82,7 @@
}
TEST_F(LiveRangesTest, CFG2) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -125,6 +127,7 @@
}
TEST_F(LiveRangesTest, CFG3) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -194,6 +197,7 @@
}
TEST_F(LiveRangesTest, Loop1) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -270,6 +274,7 @@
}
TEST_F(LiveRangesTest, Loop2) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -341,6 +346,7 @@
}
TEST_F(LiveRangesTest, CFG4) {
+ TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
diff --git a/compiler/optimizing/liveness_test.cc b/compiler/optimizing/liveness_test.cc
index 0b421cf..6af07ae 100644
--- a/compiler/optimizing/liveness_test.cc
+++ b/compiler/optimizing/liveness_test.cc
@@ -70,6 +70,7 @@
}
TEST_F(LivenessTest, CFG1) {
+ TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n"
" live in: (0)\n"
@@ -93,6 +94,7 @@
}
TEST_F(LivenessTest, CFG2) {
+ TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n"
" live in: (0)\n"
@@ -115,6 +117,7 @@
}
TEST_F(LivenessTest, CFG3) {
+ TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n" // entry block
" live in: (000)\n"
@@ -144,6 +147,7 @@
}
TEST_F(LivenessTest, CFG4) {
+ TEST_DISABLED_FOR_RISCV64();
// var a;
// if (0 == 0) {
// a = 5;
@@ -192,6 +196,7 @@
}
TEST_F(LivenessTest, CFG5) {
+ TEST_DISABLED_FOR_RISCV64();
// var a = 0;
// if (0 == 0) {
// } else {
@@ -237,6 +242,7 @@
}
TEST_F(LivenessTest, Loop1) {
+ TEST_DISABLED_FOR_RISCV64();
// Simple loop with one preheader and one back edge.
// var a = 0;
// while (a == a) {
@@ -283,6 +289,7 @@
}
TEST_F(LivenessTest, Loop3) {
+ TEST_DISABLED_FOR_RISCV64();
// Test that the returned value stays live in a preceding loop.
// var a = 0;
// while (a == a) {
@@ -330,6 +337,7 @@
TEST_F(LivenessTest, Loop4) {
+ TEST_DISABLED_FOR_RISCV64();
// Make sure we support a preheader of a loop not being the first predecessor
// in the predecessor list of the header.
// var a = 0;
@@ -382,6 +390,7 @@
}
TEST_F(LivenessTest, Loop5) {
+ TEST_DISABLED_FOR_RISCV64();
// Make sure we create a preheader of a loop when a header originally has two
// incoming blocks and one back edge.
// Bitsets are made of:
@@ -438,6 +447,7 @@
}
TEST_F(LivenessTest, Loop6) {
+ TEST_DISABLED_FOR_RISCV64();
// Bitsets are made of:
// (constant0, constant4, constant5, phi in block 2)
const char* expected =
@@ -489,6 +499,7 @@
TEST_F(LivenessTest, Loop7) {
+ TEST_DISABLED_FOR_RISCV64();
// Bitsets are made of:
// (constant0, constant4, constant5, phi in block 2, phi in block 6)
const char* expected =
@@ -543,6 +554,7 @@
}
TEST_F(LivenessTest, Loop8) {
+ TEST_DISABLED_FOR_RISCV64();
// var a = 0;
// while (a == a) {
// a = a + a;
diff --git a/compiler/optimizing/loop_optimization_test.cc b/compiler/optimizing/loop_optimization_test.cc
index 7f694fb..49e3c04 100644
--- a/compiler/optimizing/loop_optimization_test.cc
+++ b/compiler/optimizing/loop_optimization_test.cc
@@ -30,6 +30,7 @@
class LoopOptimizationTest : public OptimizingUnitTest {
protected:
void SetUp() override {
+ TEST_SETUP_DISABLED_FOR_RISCV64();
OptimizingUnitTest::SetUp();
graph_ = CreateGraph();
@@ -44,6 +45,7 @@
}
void TearDown() override {
+ TEST_TEARDOWN_DISABLED_FOR_RISCV64();
codegen_.reset();
compiler_options_.reset();
graph_ = nullptr;
@@ -134,17 +136,20 @@
//
TEST_F(LoopOptimizationTest, NoLoops) {
+ TEST_DISABLED_FOR_RISCV64();
PerformAnalysis();
EXPECT_EQ("", LoopStructure());
}
TEST_F(LoopOptimizationTest, SingleLoop) {
+ TEST_DISABLED_FOR_RISCV64();
AddLoop(entry_block_, return_block_);
PerformAnalysis();
EXPECT_EQ("[]", LoopStructure());
}
TEST_F(LoopOptimizationTest, LoopNest10) {
+ TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -156,6 +161,7 @@
}
TEST_F(LoopOptimizationTest, LoopSequence10) {
+ TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -167,6 +173,7 @@
}
TEST_F(LoopOptimizationTest, LoopSequenceOfNests) {
+ TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -194,6 +201,7 @@
}
TEST_F(LoopOptimizationTest, LoopNestWithSequence) {
+ TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -215,6 +223,7 @@
//
// This is a test for nodes.cc functionality - HGraph::SimplifyLoop.
TEST_F(LoopOptimizationTest, SimplifyLoopReoderPredecessors) {
+ TEST_DISABLED_FOR_RISCV64();
// Can't use AddLoop as we want special order for blocks predecessors.
HBasicBlock* header = new (GetAllocator()) HBasicBlock(graph_);
HBasicBlock* body = new (GetAllocator()) HBasicBlock(graph_);
@@ -260,6 +269,7 @@
//
// This is a test for nodes.cc functionality - HGraph::SimplifyLoop.
TEST_F(LoopOptimizationTest, SimplifyLoopSinglePreheader) {
+ TEST_DISABLED_FOR_RISCV64();
HBasicBlock* header = AddLoop(entry_block_, return_block_);
header->InsertInstructionBefore(
diff --git a/compiler/optimizing/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index 2df0f34..18c94538 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -31,6 +31,7 @@
class SsaLivenessAnalysisTest : public OptimizingUnitTest {
protected:
void SetUp() override {
+ TEST_SETUP_DISABLED_FOR_RISCV64();
OptimizingUnitTest::SetUp();
graph_ = CreateGraph();
compiler_options_ = CommonCompilerTest::CreateCompilerOptions(kRuntimeISA, "default");
@@ -42,6 +43,11 @@
graph_->SetEntryBlock(entry_);
}
+ void TearDown() override {
+ TEST_TEARDOWN_DISABLED_FOR_RISCV64();
+ OptimizingUnitTest::TearDown();
+ }
+
protected:
HBasicBlock* CreateSuccessor(HBasicBlock* block) {
HGraph* graph = block->GetGraph();
@@ -58,6 +64,7 @@
};
TEST_F(SsaLivenessAnalysisTest, TestReturnArg) {
+ TEST_DISABLED_FOR_RISCV64();
HInstruction* arg = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32);
entry_->AddInstruction(arg);
@@ -78,6 +85,7 @@
}
TEST_F(SsaLivenessAnalysisTest, TestAput) {
+ TEST_DISABLED_FOR_RISCV64();
HInstruction* array = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
HInstruction* index = new (GetAllocator()) HParameterValue(
@@ -147,6 +155,7 @@
}
TEST_F(SsaLivenessAnalysisTest, TestDeoptimize) {
+ TEST_DISABLED_FOR_RISCV64();
HInstruction* array = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
HInstruction* index = new (GetAllocator()) HParameterValue(