Statically link AIDL code
There's no need for it to be in its own .so, there's only one client
in each VM, and we should demonstrate typical usage.
Also remove some now-redundant code in the benchmark app. (The build
started complaining, not sure why.)
Bug: 255920361
Test: atest MicrodroidTests
Change-Id: I6377b96e5cb8686794931b2e8637b16d8428d91f
diff --git a/tests/benchmark/Android.bp b/tests/benchmark/Android.bp
index 2ba3881..e6f39f8 100644
--- a/tests/benchmark/Android.bp
+++ b/tests/benchmark/Android.bp
@@ -39,10 +39,11 @@
cc_library_shared {
name: "MicrodroidBenchmarkNativeLib",
srcs: ["src/native/benchmarkbinary.cpp"],
- static_libs: ["libiobenchmark"],
- shared_libs: [
- "android.system.virtualmachineservice-ndk",
+ static_libs: [
"com.android.microdroid.testservice-ndk",
+ "libiobenchmark",
+ ],
+ shared_libs: [
"libbase",
"libbinder_ndk",
"liblog",
diff --git a/tests/benchmark/src/native/benchmarkbinary.cpp b/tests/benchmark/src/native/benchmarkbinary.cpp
index 24712b1..18293f3 100644
--- a/tests/benchmark/src/native/benchmarkbinary.cpp
+++ b/tests/benchmark/src/native/benchmarkbinary.cpp
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#include <aidl/android/system/virtualmachineservice/IVirtualMachineService.h>
#include <aidl/com/android/microdroid/testservice/BnBenchmarkService.h>
#include <android-base/logging.h>
#include <android-base/parseint.h>
@@ -35,7 +34,6 @@
#include "io_vsock.h"
-using aidl::android::system::virtualmachineservice::IVirtualMachineService;
using android::base::ErrnoError;
using android::base::Error;
using android::base::Result;
diff --git a/tests/testapk/Android.bp b/tests/testapk/Android.bp
index da2c626..2439142 100644
--- a/tests/testapk/Android.bp
+++ b/tests/testapk/Android.bp
@@ -35,13 +35,13 @@
name: "MicrodroidTestNativeLib",
srcs: ["src/native/testbinary.cpp"],
shared_libs: [
- "com.android.microdroid.testservice-ndk",
"libbase",
"libbinder_ndk",
"MicrodroidTestNativeLibSub",
"libvm_payload",
],
static_libs: [
+ "com.android.microdroid.testservice-ndk",
"libfsverity_digests_proto_cc",
"liblog",
"libprotobuf-cpp-lite-ndk",