Skip to content

Commit 4b22c74

Browse files
gitkaiserGerrit Code Review
authored andcommitted
Merge "compile_multilib: both for libbinder RPC tests" into main
2 parents abc21dc + 1df9c5f commit 4b22c74

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

libs/binder/tests/Android.bp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ cc_defaults {
235235
"binder_test_defaults",
236236
],
237237

238+
compile_multilib: "both",
239+
multilib: {
240+
lib32: {
241+
suffix: "32",
242+
},
243+
lib64: {
244+
suffix: "64",
245+
},
246+
},
247+
238248
static_libs: [
239249
"libbinder_test_utils",
240250
"libbinder_tls_static",
@@ -267,7 +277,6 @@ cc_defaults {
267277
defaults: [
268278
"binderRpcTest_common_defaults",
269279
],
270-
compile_multilib: "first",
271280

272281
srcs: [
273282
"binderRpcTest.cpp",

libs/binder/tests/binderRpcTest.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
#include <aidl/IBinderRpcTest.h>
2020
#endif
2121

22+
#if defined(__LP64__)
23+
#define TEST_FILE_SUFFIX "64"
24+
#else
25+
#define TEST_FILE_SUFFIX "32"
26+
#endif
27+
2228
#include <chrono>
2329
#include <cstdlib>
2430
#include <iostream>
@@ -259,7 +265,8 @@ std::unique_ptr<ProcessSession> BinderRpc::createRpcTestSocketServerProcessEtc(
259265

260266
std::string path = GetExecutableDirectory();
261267
auto servicePath = path + "/binder_rpc_test_service" +
262-
(singleThreaded ? "_single_threaded" : "") + (noKernel ? "_no_kernel" : "");
268+
(singleThreaded ? "_single_threaded" : "") + (noKernel ? "_no_kernel" : "") +
269+
TEST_FILE_SUFFIX;
263270

264271
unique_fd bootstrapClientFd, socketFd;
265272

0 commit comments

Comments
 (0)