blob: 7ba682de2c7cac4e6fa2916d6c6d3a896ee48283 [file] [log] [blame]
Steven Moreland9e87d902021-08-09 15:00:57 -07001#!/usr/bin/env bash
2
3set -ex
4
5if [ $# -eq 0 ]; then
6 :
7elif [ $# -eq 1 ] && [[ "$1" =~ ^host|device$ ]]; then
8 :
9else
10 echo "usage: $0 [device|host]"
11 false
12fi
13
14# Script maintained for RPC development, while it is active, to quickly run
15# tests. Generally, to match VTS/presubmit behavior, 'atest' should be used.
16
17function dtest () { adb shell /data/nativetest64/$1/$@; }
18function hbench () { $AT/out/host/linux-x86/benchmarktest/$1/$@; }
19function hfuzz () { time $ANDROID_HOST_OUT/fuzz/x86_64/$1/$@; }
20function htest () { time $ANDROID_BUILD_TOP/out/host/linux-x86/nativetest/$1/$@; }
21function pdtest () { adb wait-for-device && adb shell mkdir -p /data/nativetest64/$1 && adb push $OUT/data/nativetest64/$1/$1 /data/nativetest64/$1/$1 && dtest $@; }
22function dbench () { adb shell /data/benchmarktest64/$1/$@; }
23function pdbench () { adb wait-for-device && adb shell mkdir -p /data/benchmarktest64/$1 && adb push $OUT/data/benchmarktest64/$1/$1 /data/benchmarktest64/$1/$1 && dbench $@; }
24
25$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode \
26 binderRpcTest \
27 binder_rpc_fuzzer \
28 binder_parcel_fuzzer \
29 binderLibTest \
30 binderRpcBenchmark
31
32if ! [ "$1" = "device" ]; then
33 htest binderRpcTest
34 hbench binderRpcBenchmark
35 hfuzz binder_rpc_fuzzer -max_total_time=30
36 hfuzz binder_parcel_fuzzer -max_total_time=30
37fi
38
39if ! [ "$1" = "host" ]; then
40 pdtest binderRpcTest
41 pdtest binderLibTest
42 pdbench binderRpcBenchmark
43fi
44