Migrate MicrodroidHostTestCases to MicrodroidBuilder
MicrodroidHostTestCases run an app in Microdroid by executing commands
against the test device directly. This functionality is now implemented
directly in Tradefed and we should therefore migrate our tests to it.
Test: atest MicrodroidHostTestCases AVFHostTestCases
Change-Id: I587fd6d140b905064fe995b994e81ad3e51a27bd
diff --git a/tests/testapk/Android.bp b/tests/testapk/Android.bp
index 42abbbf..d1d5459 100644
--- a/tests/testapk/Android.bp
+++ b/tests/testapk/Android.bp
@@ -22,7 +22,7 @@
libs: ["android.system.virtualmachine"],
jni_libs: [
"MicrodroidTestNativeLib",
- "MicrodroidTestNativeCrashLib",
+ "MicrodroidIdleNativeLib",
],
platform_apis: true,
use_embedded_native_libs: true,
@@ -50,13 +50,6 @@
}
cc_library_shared {
- name: "MicrodroidTestNativeCrashLib",
- header_libs: ["vm_payload_headers"],
- srcs: ["src/native/crashbinary.cpp"],
- stl: "libc++_static",
-}
-
-cc_library_shared {
name: "MicrodroidTestNativeLibSub",
srcs: ["src/native/testlib.cpp"],
stl: "libc++_static",
diff --git a/tests/testapk/assets/vm_config_crash.json b/tests/testapk/assets/vm_config_crash.json
index 2951fdf..3ec34a3 100644
--- a/tests/testapk/assets/vm_config_crash.json
+++ b/tests/testapk/assets/vm_config_crash.json
@@ -4,7 +4,7 @@
},
"task": {
"type": "microdroid_launcher",
- "command": "MicrodroidTestNativeCrashLib.so"
+ "command": "MicrodroidIdleNativeLib.so"
},
"export_tombstones": true
}
diff --git a/tests/testapk/assets/vm_config_crash_no_tombstone.json b/tests/testapk/assets/vm_config_crash_no_tombstone.json
index 583f87b..9678e38 100644
--- a/tests/testapk/assets/vm_config_crash_no_tombstone.json
+++ b/tests/testapk/assets/vm_config_crash_no_tombstone.json
@@ -4,7 +4,7 @@
},
"task": {
"type": "microdroid_launcher",
- "command": "MicrodroidTestNativeCrashLib.so"
+ "command": "MicrodroidIdleNativeLib.so"
},
"export_tombstones": false
}
diff --git a/tests/testapk/src/native/crashbinary.cpp b/tests/testapk/src/native/crashbinary.cpp
deleted file mode 100644
index a0edc40..0000000
--- a/tests/testapk/src/native/crashbinary.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "vm_main.h"
-
-// A VM payload that crashes as soon as it starts, to allow us to exercise that error path.
-extern "C" int AVmPayload_main() {
- printf("test crash!!!!\n");
- abort();
-}